{"openapi":"3.0.0","info":{"title":"Zelta API","description":"Core banking API \u2014 stablecoin-powered virtual cards, non-custodial wallet, AI agent card issuance, ISO 20022, Open Banking, US Payment Rails, Interledger, and Microfinance. Built with Laravel 12, featuring 61 DDD domains, event sourcing, CQRS, and privacy-preserving architecture.","contact":{"name":"Zelta Support","email":"support@finaegis.org"},"license":{"name":"Apache 2.0","url":"https:\/\/www.apache.org\/licenses\/LICENSE-2.0.html"},"version":"7.16.0"},"servers":[{"url":"http:\/\/localhost\/api\/v2","description":"API Server"},{"url":"http:\/\/localhost\/api\/v2","description":"API Server"}],"paths":{"\/api\/v1\/webhooks\/fincard":{"post":{"tags":["FinCard Webhooks"],"summary":"FinCard (FinHub) platform event webhook","description":"RSA-signature-verified (SHA256withRSA over the raw body, base64) against FinCard's platform public key. Accepts the X-FC-SIGNATURE or X-WSB-SIGNATURE header. Idempotent via processed_webhook_events.","operationId":"v1FinCardWebhook","responses":{"200":{"description":"Event accepted (or ignored as duplicate)"},"401":{"description":"Invalid signature"},"400":{"description":"Invalid payload"}}}},"\/api\/v1\/subscription\/iap\/verify":{"post":{"tags":["Subscription"],"summary":"Verify an Apple App Store \/ Google Play receipt and activate the IAP subscription","description":"Server-side validation of a store receipt (Apple JWS StoreKit 2 transaction or Google Play purchase token). Creates or updates the iap_subscriptions row and returns the unified subscription projection. Idempotent via the required Idempotency-Key header (handled by the idempotency.required middleware \u2014 not a body field).","operationId":"v1SubscriptionIapVerify","parameters":[{"name":"Idempotency-Key","in":"header","description":"Required by the idempotency.required middleware. Same key + same body replays the original response; same key + different body \u2192 409 IDEMPOTENCY_CONFLICT.","required":true,"schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["platform","receipt","productId"],"properties":{"platform":{"type":"string","example":"apple_iap","enum":["apple_iap","google_play"]},"receipt":{"description":"Apple: signed JWS transaction (StoreKit 2). Google: purchase token.","type":"string","example":"eyJhbGciOiJFUzI1NiIs..."},"originalTransactionId":{"description":"Apple-only StoreKit 2 stable transaction id.","type":"string","example":"2000000123456789","nullable":true},"productId":{"type":"string","example":"zelta_pro_monthly","enum":["zelta_pro_monthly","zelta_pro_annual"]},"appVersion":{"type":"string","example":"1.3.0","nullable":true},"currency":{"description":"ISO 4217, 3 chars. Defaults to EUR; non-EUR is rejected as ERR_CUR_001 (EUR-only in v1.3.x).","type":"string","example":"EUR","nullable":true},"withdrawalConsent":{"description":"Optional in v1.3.0, required from v1.3.1 (\u00a78.6).","properties":{"given":{"type":"boolean"},"shownAt":{"type":"string","format":"date-time"},"acceptedAt":{"type":"string","format":"date-time"},"consentText":{"type":"string"},"version":{"type":"integer","minimum":1}},"type":"object","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Receipt verified \u2014 unified subscription projection (also returned for an idempotent duplicate of the same store subscription)","content":{"application\/json":{"schema":{"properties":{"tier":{"type":"string","example":"pro"},"status":{"type":"string","example":"active","nullable":true},"source":{"type":"string","example":"apple","nullable":true},"plan":{"type":"string","example":"monthly_pro","nullable":true},"currentPeriodEnd":{"type":"string","format":"date-time","nullable":true},"trialEndsAt":{"type":"string","format":"date-time","nullable":true},"cancelledAtPeriodEnd":{"type":"boolean","example":false},"pausedUntil":{"type":"string","format":"date-time","nullable":true},"reactivated":{"type":"boolean","example":false}},"type":"object"}}}},"409":{"description":"ERR_SUB_002 \u2014 IAP subscription conflict. Mobile branches on error.conflict.kind; existingSubscription is always present.","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"ERR_SUB_002"},"message":{"type":"string","example":"Already subscribed via different store."},"conflict":{"properties":{"kind":{"type":"string","enum":["two_stores_active","different_zelta_user","family_sharing_unsupported","stale_receipt"]},"attemptedSource":{"type":"string","enum":["apple_iap","google_play"]},"existingSubscription":{"properties":{"source":{"type":"string","example":"google_play"},"currentPeriodEndsAt":{"type":"string","format":"date-time","nullable":true}},"type":"object"}},"type":"object"}},"type":"object"}},"type":"object"}}}},"422":{"description":"ERR_SUB_001 \u2014 invalid receipt (store rejected the receipt \/ unknown product id); also returned for request validation failures","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"ERR_SUB_001"},"message":{"type":"string","example":"Invalid receipt."}},"type":"object"}},"type":"object"}}}},"429":{"description":"Rate limit exceeded"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/ai\/query\/transactions":{"post":{"tags":["AI Query"],"summary":"Query transactions using natural language or structured filters","description":"Accepts a natural language query and\/or structured filters to search transactions. The NLP engine parses intent and entities from the query, builds filters, and returns matching transactions with a natural language summary.","operationId":"aiQueryTransactions","requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"query":{"description":"Natural language query (max 500 chars)","type":"string","example":"Show me all payments over $500 last month","nullable":true},"account_uuid":{"description":"Filter by specific account UUID","type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000","nullable":true},"date_from":{"description":"Start date filter","type":"string","format":"date","example":"2025-01-01","nullable":true},"date_to":{"description":"End date filter (must be >= date_from)","type":"string","format":"date","example":"2025-01-31","nullable":true},"amount_min":{"description":"Minimum amount filter","type":"number","example":100,"nullable":true},"amount_max":{"description":"Maximum amount filter (must be >= amount_min)","type":"number","example":5000,"nullable":true},"category":{"description":"Transaction category filter (max 50 chars)","type":"string","example":"transfer","nullable":true},"asset_code":{"description":"Asset code filter (3-10 uppercase letters)","type":"string","example":"USD","nullable":true},"limit":{"description":"Max results (1-100)","type":"integer","example":20,"nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Transaction query results","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"transactions":{"type":"array","items":{"type":"object"}},"summary":{"description":"Aggregated summary of results","type":"object"},"total_count":{"type":"integer","example":15},"nl_summary":{"type":"string","example":"Found 15 transactions totaling $7,500 in the last month"},"query_parsed":{"properties":{"intent":{"type":"string","example":"search_transactions"},"confidence":{"type":"number","example":0.95},"explanation":{"type":"string","example":"Searching for payments over $500"}},"type":"object","nullable":true},"filters_used":{"description":"Filters applied to the query","type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"VALIDATION_ERROR"},"message":{"type":"string","example":"The given data was invalid."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/ai\/query\/spending-analysis":{"post":{"tags":["AI Query"],"summary":"Analyze spending patterns by category, merchant, and time","description":"Uses AI to analyze spending patterns from transaction history. Accepts natural language queries or structured filters to segment spending by category, merchant, and time period.","operationId":"aiQuerySpendingAnalysis","requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"query":{"description":"Natural language query (max 500 chars)","type":"string","example":"What did I spend on food this quarter?","nullable":true},"account_uuid":{"description":"Filter by specific account UUID","type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000","nullable":true},"date_from":{"description":"Start date filter","type":"string","format":"date","example":"2025-01-01","nullable":true},"date_to":{"description":"End date filter (must be >= date_from)","type":"string","format":"date","example":"2025-03-31","nullable":true},"category":{"description":"Spending category filter (max 50 chars)","type":"string","example":"food","nullable":true},"asset_code":{"description":"Asset code filter (3-10 uppercase letters)","type":"string","example":"USD","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Spending analysis results","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"description":"Spending analysis breakdown by category, merchant, and time period","type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"VALIDATION_ERROR"},"message":{"type":"string","example":"The given data was invalid."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/ai\/chat":{"post":{"tags":["AI Agent"],"summary":"Send a message to the AI agent","description":"Send a message to the AI agent and receive a response","operationId":"aiChat","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["message"],"properties":{"message":{"type":"string","example":"What is my account balance?"},"conversation_id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"context":{"type":"object","example":{"account_id":"123"}},"model":{"type":"string","example":"gpt-4","enum":["gpt-4","gpt-3.5-turbo","claude-3"]},"temperature":{"type":"number","example":0.7,"maximum":2,"minimum":0},"stream":{"type":"boolean","example":false}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application\/json":{"schema":{"properties":{"conversation_id":{"type":"string"},"message_id":{"type":"string"},"response":{"type":"string"},"confidence":{"type":"number"},"tools_used":{"type":"array","items":{"type":"string"}},"context":{"type":"object"}},"type":"object"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"429":{"description":"Rate limit exceeded"}},"security":[{"sanctum":[]}]}},"\/api\/ai\/conversations":{"get":{"tags":["AI Agent"],"summary":"List user conversations","description":"Get a list of all conversations for the authenticated user","operationId":"listConversations","parameters":[{"name":"limit","in":"query","description":"Number of conversations to return","required":false,"schema":{"type":"integer","default":10,"maximum":100,"minimum":1}}],"responses":{"200":{"description":"List of conversations","content":{"application\/json":{"schema":{"type":"array","items":{"properties":{"id":{"type":"string"},"title":{"type":"string"},"last_message":{"type":"string"},"message_count":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}}}}}},"security":[{"sanctum":[]}]}},"\/api\/ai\/conversations\/{conversationId}":{"get":{"tags":["AI Agent"],"summary":"Get conversation history","description":"Retrieve the full message history for a conversation","operationId":"getConversation","parameters":[{"name":"conversationId","in":"path","description":"Conversation ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Conversation history","content":{"application\/json":{"schema":{"properties":{"id":{"type":"string"},"messages":{"type":"array","items":{"properties":{"role":{"type":"string","enum":["user","assistant","system"]},"content":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}},"type":"object"}},"context":{"type":"object"},"created_at":{"type":"string","format":"date-time"}},"type":"object"}}}},"404":{"description":"Conversation not found"}},"security":[{"sanctum":[]}]},"delete":{"tags":["AI Agent"],"summary":"Delete a conversation","description":"Delete a conversation and all its messages","operationId":"deleteConversation","parameters":[{"name":"conversationId","in":"path","description":"Conversation ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Conversation deleted successfully"},"404":{"description":"Conversation not found"}},"security":[{"sanctum":[]}]}},"\/api\/ai\/feedback":{"post":{"tags":["AI Agent"],"summary":"Submit feedback for an AI response","description":"Submit user feedback about an AI agent response","operationId":"submitFeedback","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["message_id","rating"],"properties":{"message_id":{"type":"string"},"rating":{"type":"integer","maximum":5,"minimum":1},"feedback":{"type":"string","maxLength":1000}},"type":"object"}}}},"responses":{"200":{"description":"Feedback submitted successfully"}},"security":[{"sanctum":[]}]}},"\/api\/accounts\/{uuid}\/balances":{"get":{"tags":["Account Balances"],"summary":"Get account balances","description":"Retrieve all asset balances for a specific account","operationId":"getAccountBalances","parameters":[{"name":"uuid","in":"path","description":"The account UUID","required":true,"schema":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"}},{"name":"asset","in":"query","description":"Filter by specific asset code","required":false,"schema":{"type":"string","example":"USD"}},{"name":"positive","in":"query","description":"Only show positive balances","required":false,"schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"account_uuid":{"type":"string","format":"uuid"},"balances":{"type":"array","items":{"properties":{"asset_code":{"type":"string"},"balance":{"type":"integer"},"formatted":{"type":"string"},"asset":{"properties":{"code":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"symbol":{"type":"string"},"precision":{"type":"integer"}},"type":"object"}},"type":"object"}},"summary":{"properties":{"total_assets":{"type":"integer"},"total_usd_equivalent":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Account not found","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Account not found"},"error":{"type":"string","example":"The specified account UUID was not found"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/balances":{"get":{"tags":["Account Balances"],"summary":"List all account balances","description":"Get balances across all accounts with filtering and aggregation options","operationId":"listAllBalances","parameters":[{"name":"asset","in":"query","description":"Filter by specific asset code","required":false,"schema":{"type":"string","example":"USD"}},{"name":"min_balance","in":"query","description":"Minimum balance filter (in smallest unit)","required":false,"schema":{"type":"integer","example":1000}},{"name":"user_uuid","in":"query","description":"Filter by account owner","required":false,"schema":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"}},{"name":"limit","in":"query","description":"Number of results per page (max 100)","required":false,"schema":{"type":"integer","example":20,"maximum":100,"minimum":1}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"account_uuid":{"type":"string","format":"uuid"},"asset_code":{"type":"string"},"balance":{"type":"integer"},"formatted":{"type":"string"},"account":{"properties":{"uuid":{"type":"string","format":"uuid"},"user_uuid":{"type":"string","format":"uuid"}},"type":"object"}},"type":"object"}},"meta":{"properties":{"total_accounts":{"type":"integer"},"total_balances":{"type":"integer"},"asset_totals":{"type":"object","additionalProperties":{"type":"string"}}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ValidationError"}}}}},"security":[{"sanctum":[]}]}},"\/api\/accounts":{"get":{"tags":["Accounts"],"summary":"List accounts","description":"Retrieves a list of accounts for the authenticated user","operationId":"listAccounts","responses":{"200":{"description":"List of accounts","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Account"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]},"post":{"tags":["Accounts"],"summary":"Create a new account","description":"Creates a new bank account for a user with an optional initial balance","operationId":"createAccount","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["user_uuid","name"],"properties":{"user_uuid":{"type":"string","format":"uuid","example":"660e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","example":"Savings Account","maxLength":255},"initial_balance":{"description":"Initial balance in cents","type":"integer","example":10000,"minimum":0}},"type":"object"}}}},"responses":{"201":{"description":"Account created successfully","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Account"},"message":{"type":"string","example":"Account created successfully"}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"sanctum":[]}]}},"\/api\/accounts\/{uuid}":{"get":{"tags":["Accounts"],"summary":"Get account details","description":"Retrieves detailed information about a specific account","operationId":"getAccount","parameters":[{"name":"uuid","in":"path","description":"Account UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Account details","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Account"}},"type":"object"}}}},"404":{"description":"Account not found","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"sanctum":[]}]},"delete":{"tags":["Accounts"],"summary":"Delete an account","description":"Deletes an account. Account must have zero balance and not be frozen.","operationId":"deleteAccount","parameters":[{"name":"uuid","in":"path","description":"Account UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Account deletion initiated","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Account deletion initiated"}},"type":"object"}}}},"422":{"description":"Cannot delete account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"Account not found","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"sanctum":[]}]}},"\/api\/accounts\/{uuid}\/freeze":{"post":{"tags":["Accounts"],"summary":"Freeze an account","description":"Freezes an account to prevent any transactions","operationId":"freezeAccount","parameters":[{"name":"uuid","in":"path","description":"Account UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["reason"],"properties":{"reason":{"type":"string","example":"Suspicious activity detected","maxLength":255},"authorized_by":{"type":"string","example":"admin@example.com","maxLength":255}},"type":"object"}}}},"responses":{"200":{"description":"Account frozen successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Account frozen successfully"}},"type":"object"}}}},"422":{"description":"Account already frozen","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"sanctum":[]}]}},"\/api\/accounts\/{uuid}\/unfreeze":{"post":{"tags":["Accounts"],"summary":"Unfreeze an account","description":"Unfreezes a previously frozen account","operationId":"unfreezeAccount","parameters":[{"name":"uuid","in":"path","description":"Account UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["reason"],"properties":{"reason":{"type":"string","example":"Investigation completed","maxLength":255},"authorized_by":{"type":"string","example":"admin@example.com","maxLength":255}},"type":"object"}}}},"responses":{"200":{"description":"Account unfrozen successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Account unfrozen successfully"}},"type":"object"}}}},"422":{"description":"Account not frozen","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/auth\/challenge":{"post":{"tags":["Agent Protocol - Authentication"],"summary":"Get authentication challenge for DID signature verification","operationId":"getAuthChallenge","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["did"],"properties":{"did":{"type":"string","example":"did:finaegis:agent:abc123def456"}},"type":"object"}}}},"responses":{"200":{"description":"Challenge generated successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"challenge":{"type":"string"},"nonce":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid DID format"},"500":{"description":"Server error"}}}},"\/api\/agent-protocol\/auth\/did":{"post":{"tags":["Agent Protocol - Authentication"],"summary":"Authenticate agent using DID signature","operationId":"authenticateWithDID","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["did","signature","challenge"],"properties":{"did":{"type":"string","example":"did:finaegis:agent:abc123def456"},"signature":{"type":"string","example":"base64_encoded_signature"},"challenge":{"type":"string","example":"base64_encoded_challenge"},"nonce":{"type":"string","example":"random_nonce_string"}},"type":"object"}}}},"responses":{"200":{"description":"Authentication successful","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"session_token":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"agent":{"type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Authentication failed"},"500":{"description":"Server error"}}}},"\/api\/agent-protocol\/auth\/api-key":{"post":{"tags":["Agent Protocol - Authentication"],"summary":"Authenticate agent using API key","operationId":"authenticateWithApiKey","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["api_key"],"properties":{"api_key":{"type":"string","example":"your_64_char_api_key"}},"type":"object"}}}},"responses":{"200":{"description":"Authentication successful","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"session_token":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"agent":{"type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Invalid API key"},"500":{"description":"Server error"}}}},"\/api\/agent-protocol\/auth\/session\/validate":{"post":{"tags":["Agent Protocol - Authentication"],"summary":"Validate an existing session token","operationId":"validateSession","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["session_token"],"properties":{"session_token":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Session validation result","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean"},"valid":{"type":"boolean"},"data":{"type":"object","nullable":true}},"type":"object"}}}}}}},"\/api\/agent-protocol\/auth\/session\/revoke":{"post":{"tags":["Agent Protocol - Authentication"],"summary":"Revoke a session token","operationId":"revokeSession","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["session_token"],"properties":{"session_token":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Session revoked successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Session revoked"}},"type":"object"}}}}},"security":[{"agentAuth":[]}]}},"\/api\/agent-protocol\/agents\/{did}\/api-keys":{"get":{"tags":["Agent Protocol - Authentication"],"summary":"List all API keys for an agent","operationId":"listApiKeys","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of API keys","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"key_id":{"type":"string"},"name":{"type":"string"},"key_prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"is_active":{"type":"boolean"},"last_used_at":{"type":"string","format":"date-time","nullable":true},"expires_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}}},"type":"object"}}}},"404":{"description":"Agent not found"}},"security":[{"sanctum":[],"agentAuth":[]}]},"post":{"tags":["Agent Protocol - Authentication"],"summary":"Generate a new API key for an agent","operationId":"generateApiKey","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name"],"properties":{"name":{"type":"string","example":"Production API Key"},"scopes":{"type":"array","items":{"type":"string"},"example":["payments:read","wallet:read"]},"expires_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}}}},"responses":{"201":{"description":"API key generated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"api_key":{"description":"Only shown once","type":"string"},"key_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"type":"object"},"warning":{"type":"string","example":"Store this API key securely. It will not be shown again."}},"type":"object"}}}},"404":{"description":"Agent not found"},"422":{"description":"Validation error"}},"security":[{"sanctum":[],"agentAuth":[]}]}},"\/api\/agent-protocol\/agents\/{did}\/api-keys\/{keyId}":{"delete":{"tags":["Agent Protocol - Authentication"],"summary":"Revoke an API key","operationId":"revokeApiKey","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","description":"API key ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key revoked","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"API key revoked"}},"type":"object"}}}},"404":{"description":"Agent or API key not found"}},"security":[{"sanctum":[],"agentAuth":[]}]}},"\/api\/agent-protocol\/agents\/{did}\/sessions":{"get":{"tags":["Agent Protocol - Authentication"],"summary":"List active sessions for an agent","operationId":"listAgentSessions","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of active sessions","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"404":{"description":"Agent not found"}},"security":[{"sanctum":[],"agentAuth":[]}]},"delete":{"tags":["Agent Protocol - Authentication"],"summary":"Revoke all sessions for an agent","operationId":"revokeAllAgentSessions","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"All sessions revoked","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string"},"revoked_count":{"type":"integer"}},"type":"object"}}}},"404":{"description":"Agent not found"}},"security":[{"sanctum":[],"agentAuth":[]}]}},"\/api\/agent-protocol\/auth\/scopes":{"get":{"tags":["Agent Protocol - Authentication"],"summary":"List all available OAuth2-style scopes","operationId":"listAvailableScopes","responses":{"200":{"description":"List of available scopes","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"scopes":{"type":"object"},"default_scopes":{"type":"array","items":{"type":"string"}}},"type":"object"}},"type":"object"}}}}}}},"\/api\/agent-protocol\/escrow":{"post":{"tags":["Agent Protocol - Escrow"],"summary":"Create a new escrow","operationId":"createEscrow","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["buyer_did","seller_did","amount","currency"],"properties":{"buyer_did":{"type":"string","example":"did:finaegis:agent:buyer123"},"seller_did":{"type":"string","example":"did:finaegis:agent:seller456"},"amount":{"type":"number","format":"float","example":1000},"currency":{"type":"string","example":"USD"},"conditions":{"type":"array","items":{"type":"string"},"example":["delivery_confirmed","quality_verified"]},"release_conditions":{"type":"array","items":{"type":"string"},"example":["delivery_confirmed"]},"timeout_seconds":{"type":"integer","example":86400},"dispute_resolution_did":{"type":"string","nullable":true},"metadata":{"type":"object"}},"type":"object"}}}},"responses":{"201":{"description":"Escrow created","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"escrow_id":{"type":"string"},"status":{"type":"string"},"amount":{"type":"number"},"expires_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request"},"404":{"description":"Agent not found"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/escrow\/{escrowId}":{"get":{"tags":["Agent Protocol - Escrow"],"summary":"Get escrow details","operationId":"getEscrow","parameters":[{"name":"escrowId","in":"path","description":"Escrow ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Escrow details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"type":"object"}}}},"404":{"description":"Escrow not found"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/escrow\/{escrowId}\/fund":{"post":{"tags":["Agent Protocol - Escrow"],"summary":"Fund an escrow (deposit funds)","operationId":"fundEscrow","parameters":[{"name":"escrowId","in":"path","description":"Escrow ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["funder_did"],"properties":{"funder_did":{"type":"string","example":"did:finaegis:agent:buyer123"}},"type":"object"}}}},"responses":{"200":{"description":"Escrow funded"},"400":{"description":"Cannot fund escrow"},"404":{"description":"Escrow not found"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/escrow\/{escrowId}\/release":{"post":{"tags":["Agent Protocol - Escrow"],"summary":"Release escrow funds to seller","operationId":"releaseEscrow","parameters":[{"name":"escrowId","in":"path","description":"Escrow ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"releaser_did":{"type":"string","example":"did:finaegis:agent:buyer123"},"conditions_met":{"type":"array","items":{"type":"string"}}},"type":"object"}}}},"responses":{"200":{"description":"Escrow released"},"400":{"description":"Cannot release escrow"},"404":{"description":"Escrow not found"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/escrow\/{escrowId}\/dispute":{"post":{"tags":["Agent Protocol - Escrow"],"summary":"Raise a dispute on an escrow","operationId":"raiseEscrowDispute","parameters":[{"name":"escrowId","in":"path","description":"Escrow ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["disputer_did","reason"],"properties":{"disputer_did":{"type":"string","example":"did:finaegis:agent:buyer123"},"reason":{"type":"string","example":"Service not delivered as agreed"},"evidence":{"type":"array","items":{"type":"string"}}},"type":"object"}}}},"responses":{"200":{"description":"Dispute raised"},"400":{"description":"Cannot dispute escrow"},"404":{"description":"Escrow not found"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/escrow\/{escrowId}\/resolve":{"post":{"tags":["Agent Protocol - Escrow"],"summary":"Resolve an escrow dispute","operationId":"resolveEscrowDispute","parameters":[{"name":"escrowId","in":"path","description":"Escrow ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["resolver_did","resolution_type"],"properties":{"resolver_did":{"type":"string","example":"did:finaegis:agent:arbiter789"},"resolution_type":{"type":"string","example":"release_to_receiver","enum":["release_to_receiver","return_to_sender","split"]},"split_percentage":{"description":"Required if resolution_type is split","type":"number","example":50},"reason":{"type":"string","example":"Evidence supports seller's claim"}},"type":"object"}}}},"responses":{"200":{"description":"Dispute resolved"},"400":{"description":"Cannot resolve dispute"},"404":{"description":"Escrow not found"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/agents\/register":{"post":{"tags":["Agent Protocol - Identity"],"summary":"Register a new agent in the system","operationId":"registerAgent","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name","type"],"properties":{"name":{"type":"string","example":"Trading Agent Alpha"},"type":{"type":"string","example":"service","enum":["service","user","system"]},"description":{"type":"string","example":"Automated trading agent"},"capabilities":{"type":"array","items":{"type":"string"},"example":["payment","trading"]},"metadata":{"type":"object","example":{"version":"1.0","provider":"FinAegis"}}},"type":"object"}}}},"responses":{"201":{"description":"Agent registered successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"agent_id":{"type":"string"},"did":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"registered_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/agents\/discover":{"get":{"tags":["Agent Protocol - Identity"],"summary":"Discover agents by capabilities or type","operationId":"discoverAgents","parameters":[{"name":"capability","in":"query","description":"Filter by capability","schema":{"type":"string"}},{"name":"type","in":"query","description":"Filter by agent type","schema":{"type":"string","enum":["service","user","system"]}},{"name":"status","in":"query","description":"Filter by status","schema":{"type":"string","enum":["active","inactive","suspended"]}},{"name":"limit","in":"query","description":"Number of results","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"List of discovered agents","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}}}}},"\/api\/agent-protocol\/agents\/{did}":{"get":{"tags":["Agent Protocol - Identity"],"summary":"Get agent details by DID","operationId":"getAgentByDID","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Agent details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"type":"object"}}}},"404":{"description":"Agent not found"}}}},"\/api\/agent-protocol\/agents\/{did}\/capabilities":{"put":{"tags":["Agent Protocol - Identity"],"summary":"Update agent capabilities","operationId":"updateAgentCapabilities","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["capabilities"],"properties":{"capabilities":{"type":"array","items":{"properties":{"name":{"type":"string"},"version":{"type":"string"},"metadata":{"type":"object"}},"type":"object"}}},"type":"object"}}}},"responses":{"200":{"description":"Capabilities updated"},"404":{"description":"Agent not found"},"403":{"description":"Not authorized"}},"security":[{"sanctum":[]}]}},"\/.well-known\/ap2-configuration":{"get":{"tags":["Agent Protocol - Identity"],"summary":"AP2 well-known configuration endpoint","operationId":"ap2Configuration","responses":{"200":{"description":"AP2 configuration","content":{"application\/json":{"schema":{"properties":{"issuer":{"type":"string"},"agent_registration_endpoint":{"type":"string"},"agent_discovery_endpoint":{"type":"string"},"payment_endpoint":{"type":"string"},"escrow_endpoint":{"type":"string"},"supported_capabilities":{"type":"array","items":{"type":"string"}}},"type":"object"}}}}}}},"\/api\/agent-protocol\/agents\/{did}\/messages":{"get":{"tags":["Agent Protocol - Messaging"],"summary":"Get messages for an agent","operationId":"getAgentMessages","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","description":"Filter by inbox\/outbox","schema":{"type":"string","enum":["inbox","outbox","all"]}},{"name":"status","in":"query","description":"Filter by status","schema":{"type":"string"}},{"name":"unacknowledged_only","in":"query","description":"Only show unacknowledged messages","schema":{"type":"boolean"}},{"name":"limit","in":"query","description":"Number of results","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"List of messages","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]},"post":{"tags":["Agent Protocol - Messaging"],"summary":"Send a message to another agent","operationId":"sendAgentMessage","parameters":[{"name":"did","in":"path","description":"Sender agent DID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["to_agent_did","message_type","payload"],"properties":{"to_agent_did":{"type":"string","example":"did:finaegis:agent:receiver456"},"message_type":{"type":"string","example":"direct","enum":["direct","broadcast","protocol","transaction","notification"]},"payload":{"type":"object","example":{"action":"quote_request","data":[]}},"priority":{"type":"string","example":"normal","enum":["low","normal","high","critical"]},"requires_acknowledgment":{"type":"boolean","example":true},"correlation_id":{"type":"string","nullable":true},"reply_to":{"type":"string","nullable":true},"headers":{"type":"object"}},"type":"object"}}}},"responses":{"201":{"description":"Message sent","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"message_id":{"type":"string"},"status":{"type":"string"},"sent_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request"},"404":{"description":"Agent not found"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/agents\/{did}\/messages\/{messageId}\/ack":{"post":{"tags":["Agent Protocol - Messaging"],"summary":"Acknowledge receipt of a message","operationId":"acknowledgeAgentMessage","parameters":[{"name":"did","in":"path","description":"Receiver agent DID","required":true,"schema":{"type":"string"}},{"name":"messageId","in":"path","description":"Message ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Message acknowledged","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"message_id":{"type":"string"},"acknowledged_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Cannot acknowledge message"},"404":{"description":"Message not found"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/agents\/{did}\/messages\/{messageId}":{"get":{"tags":["Agent Protocol - Messaging"],"summary":"Get message details","operationId":"getAgentMessage","parameters":[{"name":"did","in":"path","description":"Agent DID (must be sender or receiver)","required":true,"schema":{"type":"string"}},{"name":"messageId","in":"path","description":"Message ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Message details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"type":"object"}}}},"404":{"description":"Message not found"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/agents\/{did}\/payments":{"get":{"tags":["Agent Protocol - Payments"],"summary":"List payments for an agent","operationId":"listAgentPayments","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by status","schema":{"type":"string"}},{"name":"type","in":"query","description":"Filter by type (sent\/received)","schema":{"type":"string","enum":["sent","received","all"]}},{"name":"limit","in":"query","description":"Number of results","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"List of payments","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]},"post":{"tags":["Agent Protocol - Payments"],"summary":"Initiate a payment from an agent","operationId":"initiateAgentPayment","parameters":[{"name":"did","in":"path","description":"Sender agent DID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["to_agent_did","amount","currency"],"properties":{"to_agent_did":{"type":"string","example":"did:finaegis:agent:abc123"},"amount":{"type":"number","format":"float","example":100.5},"currency":{"type":"string","example":"USD"},"description":{"type":"string","example":"Payment for service"},"escrow_required":{"type":"boolean","example":false},"metadata":{"type":"object"}},"type":"object"}}}},"responses":{"201":{"description":"Payment initiated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"transaction_id":{"type":"string"},"status":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request"},"404":{"description":"Agent not found"},"422":{"description":"Insufficient balance"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/agents\/{did}\/payments\/{transactionId}":{"get":{"tags":["Agent Protocol - Payments"],"summary":"Get payment status","operationId":"getAgentPaymentStatus","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}},{"name":"transactionId","in":"path","description":"Transaction ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Payment status","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"type":"object"}}}},"404":{"description":"Payment not found"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/agents\/{did}\/payments\/{transactionId}\/confirm":{"post":{"tags":["Agent Protocol - Payments"],"summary":"Confirm a pending payment","operationId":"confirmAgentPayment","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}},{"name":"transactionId","in":"path","description":"Transaction ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Payment confirmed"},"400":{"description":"Cannot confirm payment"},"404":{"description":"Payment not found"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/agents\/{did}\/payments\/{transactionId}\/cancel":{"post":{"tags":["Agent Protocol - Payments"],"summary":"Cancel a pending payment","operationId":"cancelAgentPayment","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}},{"name":"transactionId","in":"path","description":"Transaction ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"reason":{"type":"string","example":"User requested cancellation"}},"type":"object"}}}},"responses":{"200":{"description":"Payment cancelled"},"400":{"description":"Cannot cancel payment"},"404":{"description":"Payment not found"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/protocol\/versions":{"get":{"tags":["Agent Protocol - Negotiation"],"summary":"Get supported protocol versions","operationId":"getProtocolVersions","responses":{"200":{"description":"List of supported protocol versions","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"versions":{"type":"array","items":{"type":"string"},"example":["1.1","1.0"]},"preferred":{"type":"string","example":"1.1"}},"type":"object"}},"type":"object"}}}}}}},"\/api\/agent-protocol\/protocol\/versions\/{version}\/capabilities":{"get":{"tags":["Agent Protocol - Negotiation"],"summary":"Get capabilities for a specific protocol version","operationId":"getVersionCapabilities","parameters":[{"name":"version","in":"path","description":"Protocol version","required":true,"schema":{"type":"string","example":"1.1"}}],"responses":{"200":{"description":"Version capabilities","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"version":{"type":"string","example":"1.1"},"capabilities":{"type":"object"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Version not supported"}}}},"\/api\/agent-protocol\/agents\/{did}\/protocol\/negotiate":{"post":{"tags":["Agent Protocol - Negotiation"],"summary":"Initiate protocol negotiation with another agent","operationId":"initiateProtocolNegotiation","parameters":[{"name":"did","in":"path","description":"Initiator agent DID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["target_did"],"properties":{"target_did":{"description":"Target agent DID","type":"string"},"preferred_capabilities":{"description":"Preferred capabilities for the negotiation","type":"array","items":{"type":"string"},"example":["messaging","payments"]}},"type":"object"}}}},"responses":{"200":{"description":"Negotiation result","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"negotiation":{"type":"object"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request"},"500":{"description":"Negotiation failed"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/agents\/{did}\/protocol\/agreements\/{otherDid}":{"get":{"tags":["Agent Protocol - Negotiation"],"summary":"Get protocol agreement between two agents","operationId":"getProtocolAgreement","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}},{"name":"otherDid","in":"path","description":"Other agent DID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Protocol agreement details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"agreement":{"type":"object"},"has_agreement":{"type":"boolean"},"is_valid":{"type":"boolean"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid DID format"}},"security":[{"sanctum":[]}]},"delete":{"tags":["Agent Protocol - Negotiation"],"summary":"Revoke protocol agreement between two agents","operationId":"revokeProtocolAgreement","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}},{"name":"otherDid","in":"path","description":"Other agent DID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Agreement revoked successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Protocol agreement revoked"}},"type":"object"}}}},"400":{"description":"Invalid DID format"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/agents\/{did}\/protocol\/agreements\/{otherDid}\/refresh":{"post":{"tags":["Agent Protocol - Negotiation"],"summary":"Refresh\/extend protocol agreement between two agents","operationId":"refreshProtocolAgreement","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}},{"name":"otherDid","in":"path","description":"Other agent DID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Agreement refresh result","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"negotiation":{"type":"object"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid DID format"},"500":{"description":"Refresh failed"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/agents\/{did}\/protocol\/agreements\/{otherDid}\/check":{"get":{"tags":["Agent Protocol - Negotiation"],"summary":"Check if a valid protocol agreement exists","operationId":"checkProtocolAgreement","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}},{"name":"otherDid","in":"path","description":"Other agent DID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Agreement check result","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"has_valid_agreement":{"type":"boolean"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid DID format"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/agents\/{did}\/reputation":{"get":{"tags":["Agent Protocol - Reputation"],"summary":"Get agent reputation score and details","operationId":"getAgentReputation","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Reputation details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"agent_did":{"type":"string"},"score":{"type":"number","example":85.5},"trust_level":{"type":"string","example":"trusted"},"total_transactions":{"type":"integer","example":150},"success_rate":{"type":"number","example":98.5},"dispute_count":{"type":"integer","example":2}},"type":"object"}},"type":"object"}}}},"404":{"description":"Agent not found"}}}},"\/api\/agent-protocol\/agents\/{did}\/reputation\/feedback":{"post":{"tags":["Agent Protocol - Reputation"],"summary":"Submit feedback about an agent transaction","operationId":"submitAgentFeedback","parameters":[{"name":"did","in":"path","description":"Agent DID to review","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["reviewer_did","transaction_id","outcome"],"properties":{"reviewer_did":{"type":"string","example":"did:finaegis:agent:reviewer123"},"transaction_id":{"type":"string","example":"txn-uuid-here"},"outcome":{"type":"string","example":"success","enum":["success","failed","cancelled","timeout"]},"rating":{"type":"integer","example":5,"maximum":5,"minimum":1},"comment":{"type":"string","example":"Fast and reliable service"},"transaction_value":{"type":"number","example":1000}},"type":"object"}}}},"responses":{"200":{"description":"Feedback submitted","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"new_score":{"type":"number"},"score_change":{"type":"number"},"new_trust_level":{"type":"string"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request"},"404":{"description":"Agent not found"}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/agents\/{did}\/reputation\/history":{"get":{"tags":["Agent Protocol - Reputation"],"summary":"Get agent reputation history","operationId":"getAgentReputationHistory","parameters":[{"name":"did","in":"path","description":"Agent DID","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of history entries","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"Reputation history","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/agent-protocol\/reputation\/leaderboard":{"get":{"tags":["Agent Protocol - Reputation"],"summary":"Get top-rated agents","operationId":"getReputationLeaderboard","parameters":[{"name":"limit","in":"query","description":"Number of agents","schema":{"type":"integer","default":10}},{"name":"capability","in":"query","description":"Filter by capability","schema":{"type":"string"}}],"responses":{"200":{"description":"Top agents by reputation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}}}}},"\/api\/agent-protocol\/agents\/{agentA}\/trust\/{agentB}":{"get":{"tags":["Agent Protocol - Reputation"],"summary":"Evaluate trust relationship between two agents","operationId":"evaluateTrustRelationship","parameters":[{"name":"agentA","in":"path","description":"First agent DID","required":true,"schema":{"type":"string"}},{"name":"agentB","in":"path","description":"Second agent DID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Trust evaluation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"trust_score":{"type":"number"},"recommended_escrow":{"type":"boolean"},"max_transaction_value":{"type":"number"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/agents\/discovery":{"get":{"tags":["AI Agents"],"summary":"Discover all AGENTS.md files","description":"Returns a list of all AGENTS.md files in the project with their locations and metadata","operationId":"discoverAgentsDocumentation","responses":{"200":{"description":"Successful discovery","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"count":{"type":"integer","example":15},"agents":{"type":"array","items":{"properties":{"path":{"type":"string","example":"app\/Domain\/Exchange\/AGENTS.md"},"domain":{"type":"string","example":"Exchange"},"type":{"type":"string","example":"domain"},"size":{"type":"integer","example":4567},"last_modified":{"type":"string","format":"date-time"},"url":{"type":"string","example":"\/api\/agents\/content\/app\/Domain\/Exchange"}},"type":"object"}}},"type":"object"}}}}}}},"\/api\/agents\/content\/{path}":{"get":{"tags":["AI Agents"],"summary":"Get AGENTS.md content","description":"Returns the content of a specific AGENTS.md file","operationId":"getAgentContent","parameters":[{"name":"path","in":"path","description":"Base64 encoded path to the AGENTS.md file","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful retrieval","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"path":{"type":"string"},"content":{"type":"string"},"metadata":{"type":"object"}},"type":"object"}}}},"404":{"description":"File not found"}}}},"\/api\/agents\/summary":{"get":{"tags":["AI Agents"],"summary":"Get AGENTS.md summary","description":"Returns a summary of all domains with AGENTS.md coverage","operationId":"getAgentsSummary","responses":{"200":{"description":"Successful summary","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"total_files":{"type":"integer"},"domains":{"type":"array","items":{"type":"string"}},"coverage":{"type":"object"}},"type":"object"}}}}}}},"\/api\/assets":{"get":{"tags":["Assets"],"summary":"List all supported assets","description":"Get a list of all assets supported by the platform, including fiat currencies, cryptocurrencies, and commodities","operationId":"listAssets","parameters":[{"name":"include_inactive","in":"query","description":"Include inactive assets in the response (default: false)","required":false,"schema":{"type":"boolean"}},{"name":"type","in":"query","description":"Filter by asset type","required":false,"schema":{"type":"string","enum":["fiat","crypto","commodity"]}},{"name":"search","in":"query","description":"Search by code or name","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"type":{"type":"string","enum":["fiat","crypto","commodity"]},"symbol":{"type":"string","example":"$"},"precision":{"type":"integer","example":2},"is_active":{"type":"boolean"},"metadata":{"type":"object"}},"type":"object"}},"meta":{"properties":{"total":{"type":"integer"},"active":{"type":"integer"},"types":{"properties":{"fiat":{"type":"integer"},"crypto":{"type":"integer"},"commodity":{"type":"integer"}},"type":"object"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/audit\/logs":{"get":{"tags":["Audit"],"summary":"Get audit logs","description":"Retrieves a paginated list of audit logs with optional filtering.","operationId":"auditGetAuditLogs","parameters":[{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","description":"Items per page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Audit logs retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"meta":{"properties":{"total":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/audit\/logs\/export":{"get":{"tags":["Audit"],"summary":"Export audit logs","description":"Initiates an export of audit logs. Returns an export ID and processing status.","operationId":"auditExportAuditLogs","parameters":[{"name":"format","in":"query","description":"Export format (e.g. csv, json)","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","description":"Start date filter","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","description":"End date filter","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Export initiated successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"export_id":{"type":"string"},"status":{"type":"string","example":"processing"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/audit\/events":{"get":{"tags":["Audit"],"summary":"Get audit events","description":"Retrieves a list of audit events.","operationId":"auditGetAuditEvents","responses":{"200":{"description":"Audit events retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/audit\/events\/{id}":{"get":{"tags":["Audit"],"summary":"Get audit event details","description":"Retrieves the details of a specific audit event by its ID.","operationId":"auditGetEventDetails","parameters":[{"name":"id","in":"path","description":"Audit event ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Event details retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"id":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Event not found"}},"security":[{"sanctum":[]}]}},"\/api\/audit\/reports":{"get":{"tags":["Audit"],"summary":"Get audit reports","description":"Retrieves a list of audit reports with pagination metadata.","operationId":"auditGetAuditReports","responses":{"200":{"description":"Audit reports retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"meta":{"properties":{"total":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/audit\/reports\/generate":{"post":{"tags":["Audit"],"summary":"Generate an audit report","description":"Initiates generation of a new audit report. Returns the report ID.","operationId":"auditGenerateAuditReport","requestBody":{"required":false,"content":{"application\/json":{"schema":{"properties":{"type":{"description":"Report type","type":"string"},"from":{"description":"Start date","type":"string","format":"date-time"},"to":{"description":"End date","type":"string","format":"date-time"},"filters":{"description":"Additional filters","type":"object"}},"type":"object"}}}},"responses":{"201":{"description":"Audit report generation initiated","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Audit report generation initiated"},"data":{"properties":{"report_id":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/audit\/trail\/{entityType}\/{entityId}":{"get":{"tags":["Audit"],"summary":"Get entity audit trail","description":"Retrieves the audit trail for a specific entity identified by type and ID.","operationId":"auditGetEntityAuditTrail","parameters":[{"name":"entityType","in":"path","description":"Entity type (e.g. user, account, transaction)","required":true,"schema":{"type":"string"}},{"name":"entityId","in":"path","description":"Entity ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Entity audit trail retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"meta":{"properties":{"entity_type":{"type":"string"},"entity_id":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Entity not found"}},"security":[{"sanctum":[]}]}},"\/api\/audit\/users\/{userId}\/activity":{"get":{"tags":["Audit"],"summary":"Get user activity","description":"Retrieves the activity log for a specific user.","operationId":"auditGetUserActivity","parameters":[{"name":"userId","in":"path","description":"User ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"User activity retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"meta":{"properties":{"user_id":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"User not found"}},"security":[{"sanctum":[]}]}},"\/api\/audit\/search":{"get":{"tags":["Audit"],"summary":"Search audit logs","description":"Searches audit logs with query parameters and returns matching results.","operationId":"auditSearchAuditLogs","parameters":[{"name":"query","in":"query","description":"Search query string","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","description":"Start date filter","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","description":"End date filter","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"action","in":"query","description":"Filter by action type","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Search results returned successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"meta":{"properties":{"total":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/audit\/archive":{"post":{"tags":["Audit"],"summary":"Archive audit logs","description":"Archives audit logs based on the provided criteria.","operationId":"auditArchiveAuditLogs","requestBody":{"required":false,"content":{"application\/json":{"schema":{"properties":{"before":{"description":"Archive logs before this date","type":"string","format":"date-time"},"retention_days":{"description":"Number of days to retain","type":"integer"}},"type":"object"}}}},"responses":{"200":{"description":"Audit logs archived successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Audit logs archived"},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/auth\/delete-account":{"post":{"tags":["Account Deletion"],"summary":"Delete user account","description":"Soft-deletes the authenticated user's account, revokes all tokens, and schedules the account for permanent deletion.","operationId":"accountDeletion","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["confirmation"],"properties":{"confirmation":{"description":"Must be the string 'DELETE' to confirm account deletion","type":"string","example":"DELETE"}},"type":"object"}}}},"responses":{"200":{"description":"Account scheduled for deletion","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"message":{"type":"string","example":"Account has been scheduled for deletion."},"deleted_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"422":{"description":"Validation error \u2014 confirmation field is required and must be 'DELETE'"}},"security":[{"sanctum":[]}]}},"\/api\/auth\/verify-email\/{id}\/{hash}":{"get":{"tags":["Authentication"],"summary":"Verify email address","description":"Verify user's email address using verification link","operationId":"verifyEmail","parameters":[{"name":"id","in":"path","description":"User ID","required":true,"schema":{"type":"integer"}},{"name":"hash","in":"path","description":"Verification hash","required":true,"schema":{"type":"string"}},{"name":"expires","in":"query","description":"Expiration timestamp","required":true,"schema":{"type":"integer"}},{"name":"signature","in":"query","description":"URL signature","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Email verified successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Email verified successfully."}},"type":"object"}}}},"403":{"description":"Invalid or expired verification link"}}}},"\/api\/auth\/resend-verification":{"post":{"tags":["Authentication"],"summary":"Resend verification email","description":"Resend email verification link to authenticated user","operationId":"resendVerification","responses":{"200":{"description":"Verification link sent","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Verification link sent."}},"type":"object"}}}},"400":{"description":"Email already verified","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Email already verified."}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/auth\/login":{"post":{"tags":["Authentication"],"summary":"Login user","description":"Authenticate user with email and password to receive an access\/refresh token pair","operationId":"login","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["email","password"],"properties":{"email":{"type":"string","format":"email","example":"john@example.com"},"password":{"type":"string","format":"password","example":"password123"},"device_name":{"description":"Optional device name for token","type":"string","example":"iPhone 12"}},"type":"object"}}}},"responses":{"200":{"description":"Login successful","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"user":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"John Doe"},"email":{"type":"string","example":"john@example.com"},"email_verified_at":{"type":"string","nullable":true}},"type":"object"},"access_token":{"type":"string","example":"2|VVGVrIVokPBXkWLOi2yK13eHlQwQtQQONX5GCngZ..."},"refresh_token":{"type":"string","example":"3|rEfReShToKeNhErE..."},"token_type":{"type":"string","example":"Bearer"},"expires_in":{"description":"Access token expiration time in seconds","type":"integer","example":86400,"nullable":true},"refresh_expires_in":{"description":"Refresh token expiration time in seconds","type":"integer","example":2592000,"nullable":true}},"type":"object"}},"type":"object"}}}},"422":{"description":"Invalid credentials","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"The provided credentials are incorrect."},"errors":{"properties":{"email":{"type":"array","items":{"type":"string","example":"The provided credentials are incorrect."}}},"type":"object"}},"type":"object"}}}}}}},"\/api\/v1\/auth\/privy-login":{"post":{"tags":["Authentication"],"summary":"Exchange a Privy session JWT for a Sanctum token","description":"Verifies the Privy-issued session JWT against Privy's JWKS, extracts the linked email (or fetches it from the Privy users API as fallback), finds or creates the backing user with the real email, and returns a Sanctum bearer token with read\/write\/delete abilities.","operationId":"privyLogin","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["privy_token"],"properties":{"privy_token":{"description":"Privy-issued session JWT (RS256)","type":"string","example":"eyJhbGciOiJSUzI1NiIs..."},"name":{"description":"Optional display name captured during signup. Used only for new-user creation; ignored on returning logins.","type":"string","example":"Jane Doe","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Privy login successful","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"user":{"properties":{"id":{"type":"integer","example":1},"email":{"type":"string","example":"jane@example.com"},"privy_user_id":{"type":"string","example":"did:privy:cl9..."}},"type":"object"},"token":{"type":"string","example":"7|VVGVrIVokPBXkWLOi2yK..."},"token_type":{"type":"string","example":"Bearer"},"is_new_user":{"description":"True on first login (user record was just created); false on returning logins.","type":"boolean","example":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Invalid or expired Privy token","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"INVALID_PRIVY_TOKEN"},"message":{"type":"string","example":"Privy JWT signature is invalid."}},"type":"object"}},"type":"object"}}}},"409":{"description":"Email already in use by a non-Privy user","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"EMAIL_ALREADY_EXISTS"},"message":{"type":"string","example":"An account with this email already exists. Use a different Privy email or sign in with the existing credentials."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation failed or no email linked to Privy account","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"The privy token field is required."},"errors":{"type":"object"}},"type":"object"}}}}}}},"\/api\/auth\/logout":{"post":{"tags":["Authentication"],"summary":"Logout user","description":"Logout the authenticated user and revoke all their tokens","operationId":"logout","responses":{"200":{"description":"Logout successful","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Logged out successfully"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Unauthenticated"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/auth\/refresh":{"post":{"tags":["Authentication"],"summary":"Refresh access token","description":"Uses a refresh token to obtain a new access\/refresh token pair. Does not require auth:sanctum middleware.","operationId":"refreshToken","requestBody":{"required":false,"content":{"application\/json":{"schema":{"properties":{"refresh_token":{"description":"Refresh token (alternatively send via Authorization: Bearer header)","type":"string","example":"2|xyz..."}},"type":"object"}}}},"responses":{"200":{"description":"Token refreshed successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"access_token":{"type":"string","example":"3|newTokenHere..."},"refresh_token":{"type":"string","example":"4|newRefreshHere..."},"token_type":{"type":"string","example":"Bearer"},"expires_in":{"description":"Access token expiration time in seconds","type":"integer","example":86400,"nullable":true},"refresh_expires_in":{"description":"Refresh token expiration time in seconds","type":"integer","example":2592000,"nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Invalid or expired refresh token","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Invalid or expired refresh token."}},"type":"object"}}}}}}},"\/api\/auth\/logout-all":{"post":{"tags":["Authentication"],"summary":"Logout from all devices","description":"Revokes all tokens for the authenticated user across all devices","operationId":"logoutAll","responses":{"200":{"description":"All sessions terminated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"message":{"type":"string","example":"All sessions terminated successfully"},"revoked_count":{"type":"integer","example":3}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Unauthenticated"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/auth\/user":{"get":{"tags":["Authentication"],"summary":"Get current user","description":"Get the authenticated user's information","operationId":"getUser","responses":{"200":{"description":"User information retrieved successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"John Doe"},"email":{"type":"string","format":"email","example":"john@example.com"},"email_verified_at":{"type":"string","format":"date-time","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Unauthenticated"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/auth\/passkey\/challenge":{"post":{"tags":["WebAuthn"],"summary":"Generate WebAuthn challenge","description":"Generates a WebAuthn challenge for passkey authentication or registration. Pass type=registration (with auth) for PublicKeyCredentialCreationOptions.","operationId":"passkeyChallenge","requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"device_id":{"description":"Unique device identifier (optional if email provided)","type":"string"},"email":{"description":"User email (optional if device_id provided)","type":"string","format":"email"},"type":{"description":"Challenge type (default: assertion)","type":"string","enum":["assertion","registration"]}},"type":"object"}}}},"responses":{"200":{"description":"Challenge generated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"type":"object"}}}},"400":{"description":"No passkeys available"},"401":{"description":"Unauthorized (required for registration)"},"404":{"description":"User or device not found"},"422":{"description":"Validation error \u2014 provide device_id or email"}}}},"\/api\/v1\/auth\/passkey\/authenticate":{"post":{"tags":["WebAuthn"],"summary":"Verify WebAuthn assertion and authenticate","description":"Verifies a WebAuthn assertion response and returns an access token on success.","operationId":"passkeyAuthenticate","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["device_id","challenge","credential_id","authenticator_data","client_data_json","signature"],"properties":{"device_id":{"description":"Unique device identifier","type":"string"},"challenge":{"description":"The challenge string from the challenge endpoint","type":"string"},"credential_id":{"description":"WebAuthn credential ID","type":"string"},"authenticator_data":{"description":"Base64-encoded authenticator data","type":"string"},"client_data_json":{"description":"Base64-encoded client data JSON","type":"string"},"signature":{"description":"Base64-encoded assertion signature","type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Authentication successful","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"user":{"type":"object"},"access_token":{"type":"string"},"token_type":{"type":"string","example":"Bearer"},"expires_in":{"type":"integer","example":86400,"nullable":true},"expires_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Authentication failed"},"404":{"description":"Device not found"},"429":{"description":"Too many failed attempts, passkey blocked"}}}},"\/api\/auth\/passkey\/register":{"post":{"tags":["WebAuthn"],"summary":"Register a new passkey credential","description":"Registers a new WebAuthn passkey credential. Supports attestation-based flow (challenge + attestation_object) or legacy flow (direct public_key).","operationId":"passkeyRegister","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["device_id","credential_id"],"properties":{"device_id":{"description":"Unique device identifier","type":"string"},"credential_id":{"description":"WebAuthn credential ID (base64url)","type":"string"},"challenge":{"description":"The challenge from registration challenge endpoint","type":"string"},"client_data_json":{"description":"Base64-encoded clientDataJSON from navigator.credentials.create()","type":"string"},"attestation_object":{"description":"Base64-encoded attestationObject from navigator.credentials.create()","type":"string"},"public_key":{"description":"Base64-encoded public key (legacy flow, used if attestation_object not provided)","type":"string"}},"type":"object"}}}},"responses":{"201":{"description":"Passkey registered successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"credential_id":{"type":"string"},"registered_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Device does not belong to authenticated user"},"404":{"description":"Device not found"},"422":{"description":"Validation error or attestation verification failed"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/auth\/change-password":{"post":{"tags":["Authentication"],"summary":"Change user password","description":"Change the authenticated user's password and invalidate all existing tokens","operationId":"changePassword","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["current_password","new_password","new_password_confirmation"],"properties":{"current_password":{"type":"string","format":"password","example":"oldpassword123"},"new_password":{"type":"string","format":"password","example":"newpassword123"},"new_password_confirmation":{"type":"string","format":"password","example":"newpassword123"}},"type":"object"}}}},"responses":{"200":{"description":"Password changed successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Password changed successfully"},"new_token":{"type":"string","example":"1|laravel_sanctum_token..."}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Unauthorized - Invalid current password"}},"security":[{"sanctum":[]}]}},"\/api\/auth\/forgot-password":{"post":{"tags":["Authentication"],"summary":"Request password reset link","description":"Send a password reset link to the user's email address","operationId":"forgotPassword","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["email"],"properties":{"email":{"type":"string","format":"email","example":"user@example.com"}},"type":"object"}}}},"responses":{"200":{"description":"Password reset link sent","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ValidationError"}}}},"429":{"description":"Too many requests","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Too many requests. Please try again later."}},"type":"object"}}}}}}},"\/api\/auth\/reset-password":{"post":{"tags":["Authentication"],"summary":"Reset password","description":"Reset user password using token received via email","operationId":"resetPassword","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["email","password","password_confirmation","token"],"properties":{"email":{"type":"string","format":"email","example":"user@example.com"},"password":{"type":"string","format":"password","example":"newpassword123"},"password_confirmation":{"type":"string","format":"password","example":"newpassword123"},"token":{"type":"string","example":"reset-token-here"}},"type":"object"}}}},"responses":{"200":{"description":"Password reset successful","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Your password has been reset."}},"type":"object"}}}},"422":{"description":"Validation error or invalid token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ValidationError"}}}}}}},"\/api\/auth\/register":{"post":{"tags":["Authentication"],"summary":"Register a new user","description":"Create a new user account with email and password","operationId":"register","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name","email","password","password_confirmation"],"properties":{"name":{"description":"User's full name","type":"string","example":"John Doe"},"email":{"description":"User's email address","type":"string","format":"email","example":"john@example.com"},"password":{"description":"User's password (min 8 characters)","type":"string","format":"password","example":"password123"},"password_confirmation":{"description":"Password confirmation","type":"string","format":"password","example":"password123"},"is_business_customer":{"description":"Whether the user is a business customer","type":"boolean","example":false}},"type":"object"}}}},"responses":{"201":{"description":"User registered successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"user":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"John Doe"},"email":{"type":"string","example":"john@example.com"},"email_verified_at":{"type":"string","example":null,"nullable":true}},"type":"object"},"access_token":{"type":"string","example":"1|aBcDeFgHiJkLmNoPqRsTuVwXyZ..."},"refresh_token":{"type":"string","example":"2|rEfReShToKeNhErE..."},"token_type":{"type":"string","example":"Bearer"},"expires_in":{"description":"Access token expiration time in seconds","type":"integer","example":86400,"nullable":true},"refresh_expires_in":{"description":"Refresh token expiration time in seconds","type":"integer","example":2592000,"nullable":true}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"The given data was invalid."},"errors":{"properties":{"email":{"type":"array","items":{"type":"string","example":"The email has already been taken."}}},"type":"object"}},"type":"object"}}}}}}},"\/api\/auth\/social\/{provider}":{"get":{"tags":["Authentication"],"summary":"Get OAuth redirect URL","description":"Get the OAuth redirect URL for social login","operationId":"socialRedirect","parameters":[{"name":"provider","in":"path","description":"OAuth provider (google, facebook, github)","required":true,"schema":{"type":"string","enum":["google","facebook","github"]}}],"responses":{"200":{"description":"OAuth redirect URL","content":{"application\/json":{"schema":{"properties":{"url":{"type":"string","example":"https:\/\/accounts.google.com\/o\/oauth2\/auth?..."}},"type":"object"}}}},"400":{"description":"Invalid provider"}}}},"\/api\/auth\/social\/{provider}\/callback":{"post":{"tags":["Authentication"],"summary":"Handle OAuth callback","description":"Process OAuth callback and authenticate user","operationId":"socialCallback","parameters":[{"name":"provider","in":"path","description":"OAuth provider","required":true,"schema":{"type":"string","enum":["google","facebook","github"]}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["code"],"properties":{"code":{"description":"OAuth authorization code","type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"User authenticated successfully","content":{"application\/json":{"schema":{"properties":{"user":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"John Doe"},"email":{"type":"string","example":"john@example.com"}},"type":"object"},"token":{"type":"string","example":"1|laravel_sanctum_token..."},"message":{"type":"string","example":"Authenticated successfully"}},"type":"object"}}}},"400":{"description":"Invalid provider or authentication failed"}}}},"\/api\/auth\/2fa\/enable":{"post":{"tags":["Authentication"],"summary":"Enable two-factor authentication","description":"Enable 2FA for the authenticated user","operationId":"enable2FA","responses":{"200":{"description":"2FA enabled successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Two-factor authentication enabled successfully."},"secret":{"type":"string","example":"JBSWY3DPEHPK3PXP"},"qr_code":{"type":"string","example":"data:image\/png;base64,..."},"recovery_codes":{"type":"array","items":{"type":"string"}}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/auth\/2fa\/confirm":{"post":{"tags":["Authentication"],"summary":"Confirm two-factor authentication","description":"Confirm 2FA setup with verification code","operationId":"confirm2FA","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["code"],"properties":{"code":{"type":"string","example":"123456"}},"type":"object"}}}},"responses":{"200":{"description":"2FA confirmed successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Two-factor authentication confirmed successfully."}},"type":"object"}}}},"422":{"description":"Invalid verification code"}},"security":[{"sanctum":[]}]}},"\/api\/auth\/2fa\/disable":{"post":{"tags":["Authentication"],"summary":"Disable two-factor authentication","description":"Disable 2FA for the authenticated user","operationId":"disable2FA","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["password"],"properties":{"password":{"type":"string","format":"password","example":"current-password"}},"type":"object"}}}},"responses":{"200":{"description":"2FA disabled successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Two-factor authentication disabled successfully."}},"type":"object"}}}},"422":{"description":"Invalid password"}},"security":[{"sanctum":[]}]}},"\/api\/auth\/2fa\/verify":{"post":{"tags":["Authentication"],"summary":"Verify two-factor authentication code","description":"Verify 2FA code during login","operationId":"verify2FA","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["code"],"properties":{"code":{"type":"string","example":"123456"},"recovery_code":{"description":"Use recovery code instead of 2FA code","type":"string","example":"recovery-code"}},"type":"object"}}}},"responses":{"200":{"description":"2FA verified successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Two-factor authentication verified successfully."},"token":{"type":"string","example":"1|laravel_sanctum_token..."}},"type":"object"}}}},"422":{"description":"Invalid code"}}}},"\/api\/auth\/2fa\/recovery-codes":{"post":{"tags":["Authentication"],"summary":"Regenerate recovery codes","description":"Generate new set of recovery codes","operationId":"regenerateRecoveryCodes","responses":{"200":{"description":"Recovery codes regenerated","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Recovery codes regenerated successfully."},"recovery_codes":{"type":"array","items":{"type":"string"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/bian\/current-account\/initiate":{"post":{"tags":["BIAN"],"summary":"Initiate new current account","description":"Creates a new current account fulfillment arrangement following BIAN standards","operationId":"initiateCurrentAccount","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["customerReference","accountName","accountType"],"properties":{"customerReference":{"description":"Customer UUID reference","type":"string","format":"uuid"},"accountName":{"description":"Account name","type":"string","maxLength":255},"accountType":{"description":"Account type","type":"string","enum":["current","checking"]},"initialDeposit":{"description":"Initial deposit amount in cents","type":"integer","minimum":0},"currency":{"description":"Currency code","type":"string","pattern":"^[A-Z]{3}$","default":"USD"}},"type":"object"}}}},"responses":{"201":{"description":"Account created successfully","content":{"application\/json":{"schema":{"properties":{"currentAccountFulfillmentArrangement":{"properties":{"crReferenceId":{"type":"string","format":"uuid"},"customerReference":{"type":"string","format":"uuid"},"accountName":{"type":"string"},"accountType":{"type":"string"},"accountStatus":{"type":"string","example":"active"},"accountBalance":{"properties":{"amount":{"type":"integer"},"currency":{"type":"string"}},"type":"object"},"dateType":{"properties":{"date":{"type":"string","format":"date-time"},"dateTypeName":{"type":"string","example":"AccountOpeningDate"}},"type":"object"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/bian\/current-account\/{crReferenceId}":{"get":{"tags":["BIAN"],"summary":"Retrieve current account details","description":"Retrieves the details of a current account fulfillment arrangement","operationId":"retrieveCurrentAccount","parameters":[{"name":"crReferenceId","in":"path","description":"Control Record Reference ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Account details retrieved successfully","content":{"application\/json":{"schema":{"properties":{"currentAccountFulfillmentArrangement":{"properties":{"crReferenceId":{"type":"string","format":"uuid"},"customerReference":{"type":"string","format":"uuid"},"accountName":{"type":"string"},"accountType":{"type":"string"},"accountStatus":{"type":"string"},"accountBalance":{"properties":{"amount":{"type":"integer"},"currency":{"type":"string"}},"type":"object"},"dateType":{"properties":{"date":{"type":"string","format":"date-time"},"dateTypeName":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Account not found"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]},"put":{"tags":["BIAN"],"summary":"Update current account","description":"Updates the properties of a current account fulfillment arrangement","operationId":"updateCurrentAccount","parameters":[{"name":"crReferenceId","in":"path","description":"Control Record Reference ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"accountName":{"type":"string","maxLength":255},"accountStatus":{"type":"string","enum":["active","dormant","closed"]}},"type":"object"}}}},"responses":{"200":{"description":"Account updated successfully","content":{"application\/json":{"schema":{"properties":{"currentAccountFulfillmentArrangement":{"properties":{"crReferenceId":{"type":"string","format":"uuid"},"customerReference":{"type":"string","format":"uuid"},"accountName":{"type":"string"},"accountType":{"type":"string"},"accountStatus":{"type":"string"},"updateResult":{"type":"string","example":"successful"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Account not found"},"422":{"description":"Validation error"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/bian\/current-account\/{crReferenceId}\/control":{"put":{"tags":["BIAN"],"summary":"Control account status","description":"Controls the status of a current account (freeze, unfreeze, suspend, reactivate)","operationId":"controlCurrentAccount","parameters":[{"name":"crReferenceId","in":"path","description":"Control Record Reference ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["controlAction","controlReason"],"properties":{"controlAction":{"type":"string","enum":["freeze","unfreeze","suspend","reactivate"]},"controlReason":{"type":"string","maxLength":500}},"type":"object"}}}},"responses":{"200":{"description":"Control action executed successfully","content":{"application\/json":{"schema":{"properties":{"currentAccountFulfillmentControlRecord":{"properties":{"crReferenceId":{"type":"string","format":"uuid"},"controlAction":{"type":"string"},"controlReason":{"type":"string"},"controlStatus":{"type":"string"},"controlDateTime":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Account not found"},"422":{"description":"Validation error"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/bian\/current-account\/{crReferenceId}\/payment\/execute":{"post":{"tags":["BIAN"],"summary":"Execute payment\/withdrawal","description":"Executes a payment or withdrawal from the current account","operationId":"executePaymentFromAccount","parameters":[{"name":"crReferenceId","in":"path","description":"Control Record Reference ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["paymentAmount","paymentType"],"properties":{"paymentAmount":{"description":"Amount in cents","type":"integer","minimum":1},"paymentType":{"type":"string","enum":["withdrawal","payment","transfer"]},"paymentDescription":{"type":"string","maxLength":500}},"type":"object"}}}},"responses":{"200":{"description":"Payment executed successfully","content":{"application\/json":{"schema":{"properties":{"paymentExecutionRecord":{"properties":{"crReferenceId":{"type":"string","format":"uuid"},"bqReferenceId":{"type":"string","format":"uuid"},"executionStatus":{"type":"string","example":"completed"},"paymentAmount":{"type":"integer"},"paymentType":{"type":"string"},"paymentDescription":{"type":"string","nullable":true},"accountBalance":{"type":"integer"},"executionDateTime":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Insufficient funds","content":{"application\/json":{"schema":{"properties":{"paymentExecutionRecord":{"properties":{"executionStatus":{"type":"string","example":"rejected"},"executionReason":{"type":"string","example":"Insufficient funds"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Account not found"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/bian\/current-account\/{crReferenceId}\/deposit\/execute":{"post":{"tags":["BIAN"],"summary":"Execute deposit","description":"Executes a deposit to the current account","operationId":"executeDepositToAccount","parameters":[{"name":"crReferenceId","in":"path","description":"Control Record Reference ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["depositAmount","depositType"],"properties":{"depositAmount":{"description":"Amount in cents","type":"integer","minimum":1},"depositType":{"type":"string","enum":["cash","check","transfer","direct"]},"depositDescription":{"type":"string","maxLength":500}},"type":"object"}}}},"responses":{"200":{"description":"Deposit executed successfully","content":{"application\/json":{"schema":{"properties":{"depositExecutionRecord":{"properties":{"crReferenceId":{"type":"string","format":"uuid"},"bqReferenceId":{"type":"string","format":"uuid"},"executionStatus":{"type":"string","example":"completed"},"depositAmount":{"type":"integer"},"depositType":{"type":"string"},"depositDescription":{"type":"string","nullable":true},"accountBalance":{"type":"integer"},"executionDateTime":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Account not found"},"422":{"description":"Validation error"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/bian\/current-account\/{crReferenceId}\/account-balance\/retrieve":{"get":{"tags":["BIAN"],"summary":"Retrieve account balance","description":"Retrieves the current balance of the account","operationId":"retrieveAccountBalance","parameters":[{"name":"crReferenceId","in":"path","description":"Control Record Reference ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Balance retrieved successfully","content":{"application\/json":{"schema":{"properties":{"accountBalanceRecord":{"properties":{"crReferenceId":{"type":"string","format":"uuid"},"bqReferenceId":{"type":"string","format":"uuid"},"balanceAmount":{"type":"integer"},"balanceCurrency":{"type":"string","example":"USD"},"balanceType":{"type":"string","example":"available"},"balanceDateTime":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Account not found"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/bian\/current-account\/{crReferenceId}\/transaction-report\/retrieve":{"get":{"tags":["BIAN"],"summary":"Retrieve transaction report","description":"Retrieves a report of account transactions for a specified period","operationId":"retrieveTransactionReport","parameters":[{"name":"crReferenceId","in":"path","description":"Control Record Reference ID","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"fromDate","in":"query","description":"Start date for transaction report","required":false,"schema":{"type":"string","format":"date"}},{"name":"toDate","in":"query","description":"End date for transaction report","required":false,"schema":{"type":"string","format":"date"}},{"name":"transactionType","in":"query","description":"Filter by transaction type","required":false,"schema":{"type":"string","enum":["all","credit","debit"]}}],"responses":{"200":{"description":"Transaction report retrieved successfully","content":{"application\/json":{"schema":{"properties":{"transactionReportRecord":{"properties":{"crReferenceId":{"type":"string","format":"uuid"},"bqReferenceId":{"type":"string","format":"uuid"},"reportPeriod":{"properties":{"fromDate":{"type":"string","format":"date"},"toDate":{"type":"string","format":"date"}},"type":"object"},"transactions":{"type":"array","items":{"properties":{"transactionReference":{"type":"string"},"transactionType":{"type":"string","enum":["credit","debit"]},"transactionAmount":{"type":"integer"},"transactionDateTime":{"type":"string","format":"date-time"},"transactionDescription":{"type":"string"}},"type":"object"}},"transactionCount":{"type":"integer"},"reportDateTime":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Account not found"},"422":{"description":"Validation error"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/bian\/payment-initiation\/initiate":{"post":{"tags":["BIAN"],"summary":"Initiate new payment transaction","description":"Creates a new payment transaction following BIAN Payment Initiation standards","operationId":"initiatePayment","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["payerReference","payeeReference","paymentAmount","paymentType"],"properties":{"payerReference":{"description":"Payer account UUID","type":"string","format":"uuid"},"payeeReference":{"description":"Payee account UUID","type":"string","format":"uuid"},"paymentAmount":{"description":"Payment amount in cents","type":"integer","minimum":1},"paymentCurrency":{"type":"string","pattern":"^[A-Z]{3}$","default":"USD"},"paymentPurpose":{"type":"string","maxLength":500},"paymentType":{"type":"string","enum":["internal","external","instant","scheduled"]},"valueDate":{"description":"For scheduled payments","type":"string","format":"date"}},"type":"object"}}}},"responses":{"201":{"description":"Payment initiated successfully","content":{"application\/json":{"schema":{"properties":{"paymentInitiationTransaction":{"properties":{"crReferenceId":{"type":"string","format":"uuid"},"paymentStatus":{"type":"string","enum":["completed","scheduled","failed"]},"paymentDetails":{"properties":{"payerReference":{"type":"string"},"payerName":{"type":"string"},"payeeReference":{"type":"string"},"payeeName":{"type":"string"},"paymentAmount":{"type":"integer"},"paymentCurrency":{"type":"string"},"paymentPurpose":{"type":"string","nullable":true},"paymentType":{"type":"string"}},"type":"object"},"paymentSchedule":{"properties":{"initiationDate":{"type":"string","format":"date-time"},"valueDate":{"type":"string","format":"date"}},"type":"object"},"balanceAfterPayment":{"properties":{"payerBalance":{"type":"integer"},"payeeBalance":{"type":"integer"}},"type":"object"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Insufficient funds or validation error","content":{"application\/json":{"schema":{"properties":{"paymentInitiationTransaction":{"properties":{"paymentStatus":{"type":"string","example":"rejected"},"statusReason":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/bian\/payment-initiation\/{crReferenceId}\/update":{"put":{"tags":["BIAN"],"summary":"Update payment transaction","description":"Updates the status of a payment transaction (cancel, suspend, resume)","operationId":"updatePayment","parameters":[{"name":"crReferenceId","in":"path","description":"Control Record Reference ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["paymentStatus","statusReason"],"properties":{"paymentStatus":{"type":"string","enum":["cancelled","suspended","resumed"]},"statusReason":{"type":"string","maxLength":500}},"type":"object"}}}},"responses":{"200":{"description":"Payment updated successfully","content":{"application\/json":{"schema":{"properties":{"paymentInitiationTransaction":{"properties":{"crReferenceId":{"type":"string","format":"uuid"},"updateAction":{"type":"string"},"updateReason":{"type":"string"},"updateStatus":{"type":"string","example":"successful"},"updateDateTime":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Payment transaction not found"},"422":{"description":"Validation error"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/bian\/payment-initiation\/{crReferenceId}\/retrieve":{"get":{"tags":["BIAN"],"summary":"Retrieve payment details","description":"Retrieves the details of a specific payment transaction","operationId":"retrievePayment","parameters":[{"name":"crReferenceId","in":"path","description":"Control Record Reference ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Payment details retrieved successfully","content":{"application\/json":{"schema":{"properties":{"paymentInitiationTransaction":{"properties":{"crReferenceId":{"type":"string","format":"uuid"},"paymentStatus":{"type":"string"},"paymentDetails":{"properties":{"payerReference":{"type":"string"},"payeeReference":{"type":"string"},"paymentAmount":{"type":"integer"},"paymentCurrency":{"type":"string"}},"type":"object"},"paymentSchedule":{"properties":{"initiationDate":{"type":"string","format":"date-time"},"completionDate":{"type":"string","format":"date-time"}},"type":"object"},"paymentReference":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"404":{"description":"Payment transaction not found"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/bian\/payment-initiation\/{crReferenceId}\/execute":{"post":{"tags":["BIAN"],"summary":"Execute payment transaction","description":"Executes a scheduled or pending payment transaction","operationId":"executePayment","parameters":[{"name":"crReferenceId","in":"path","description":"Control Record Reference ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["executionMode"],"properties":{"executionMode":{"type":"string","enum":["immediate","retry","force"]}},"type":"object"}}}},"responses":{"200":{"description":"Payment executed successfully","content":{"application\/json":{"schema":{"properties":{"paymentExecutionRecord":{"properties":{"crReferenceId":{"type":"string","format":"uuid"},"executionMode":{"type":"string"},"executionStatus":{"type":"string","example":"completed"},"executionDateTime":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Payment transaction not found"},"422":{"description":"Validation error"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/bian\/payment-initiation\/{crReferenceId}\/payment-status\/request":{"post":{"tags":["BIAN"],"summary":"Request payment status","description":"Requests the current status of a payment transaction","operationId":"requestPaymentStatus","parameters":[{"name":"crReferenceId","in":"path","description":"Control Record Reference ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Payment status retrieved successfully","content":{"application\/json":{"schema":{"properties":{"paymentStatusRecord":{"properties":{"crReferenceId":{"type":"string","format":"uuid"},"bqReferenceId":{"type":"string","format":"uuid"},"paymentStatus":{"type":"string","enum":["not_found","completed"]},"statusCheckDateTime":{"type":"string","format":"date-time"},"eventCount":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/bian\/payment-initiation\/{accountReference}\/payment-history\/retrieve":{"get":{"tags":["BIAN"],"summary":"Retrieve payment history","description":"Retrieves the payment history for a specific account","operationId":"retrievePaymentHistory","parameters":[{"name":"accountReference","in":"path","description":"Account UUID reference","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"fromDate","in":"query","description":"Start date for payment history","required":false,"schema":{"type":"string","format":"date"}},{"name":"toDate","in":"query","description":"End date for payment history","required":false,"schema":{"type":"string","format":"date"}},{"name":"paymentDirection","in":"query","description":"Filter by payment direction","required":false,"schema":{"type":"string","enum":["sent","received","all"]}}],"responses":{"200":{"description":"Payment history retrieved successfully","content":{"application\/json":{"schema":{"properties":{"paymentHistoryRecord":{"properties":{"accountReference":{"type":"string","format":"uuid"},"bqReferenceId":{"type":"string","format":"uuid"},"historyPeriod":{"properties":{"fromDate":{"type":"string","format":"date"},"toDate":{"type":"string","format":"date"}},"type":"object"},"payments":{"type":"array","items":{"properties":{"paymentReference":{"type":"string"},"paymentDirection":{"type":"string","enum":["sent","received"]},"payerReference":{"type":"string"},"payeeReference":{"type":"string"},"paymentAmount":{"type":"integer"},"paymentDateTime":{"type":"string","format":"date-time"},"paymentHash":{"type":"string","nullable":true}},"type":"object"}},"paymentCount":{"type":"integer"},"retrievalDateTime":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Account not found"},"422":{"description":"Validation error"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/accounts\/{uuid}\/balance":{"get":{"tags":["Balance"],"summary":"Get account balance","description":"Retrieves the current balance and turnover information for an account","operationId":"getAccountBalance","parameters":[{"name":"uuid","in":"path","description":"Account UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Balance information retrieved","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Balance"}},"type":"object"}}}},"404":{"description":"Account not found","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"sanctum":[]}]}},"\/api\/accounts\/{uuid}\/balance\/summary":{"get":{"tags":["Balance"],"summary":"Get account balance summary","description":"Retrieves detailed balance statistics including 12-month turnover data","operationId":"getAccountBalanceSummary","parameters":[{"name":"uuid","in":"path","description":"Account UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Balance summary retrieved","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"account_uuid":{"type":"string","format":"uuid"},"current_balance":{"type":"integer","example":50000},"frozen":{"type":"boolean","example":false},"statistics":{"properties":{"total_debit_12_months":{"type":"integer","example":120000},"total_credit_12_months":{"type":"integer","example":170000},"average_monthly_debit":{"type":"number","example":10000},"average_monthly_credit":{"type":"number","example":14166.67},"months_analyzed":{"type":"integer","example":12}},"type":"object"},"monthly_turnovers":{"type":"array","items":{"properties":{"month":{"type":"integer","example":1},"year":{"type":"integer","example":2024},"debit":{"type":"integer","example":10000},"credit":{"type":"integer","example":15000}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"404":{"description":"Account not found","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"sanctum":[]}]}},"\/api\/bank-alerting\/health-check":{"post":{"tags":["Bank Alerting"],"summary":"Trigger bank health check","description":"Manually trigger a system-wide health check for all custodian banks","operationId":"triggerBankHealthCheck","responses":{"200":{"description":"Health check completed successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"health_check_completed":{"type":"boolean","example":true},"checked_at":{"type":"string","format":"date-time"},"custodians_checked":{"type":"integer","example":4},"summary":{"properties":{"healthy":{"type":"integer","example":3},"degraded":{"type":"integer","example":1},"unhealthy":{"type":"integer","example":0},"unknown":{"type":"integer","example":0}},"type":"object"},"custodian_details":{"type":"array","items":{"type":"object"}}},"type":"object"},"message":{"type":"string"}},"type":"object"}}}},"500":{"description":"Health check failed"}},"security":[{"bearerAuth":[]}]}},"\/api\/bank-alerting\/health-status":{"get":{"tags":["Bank Alerting"],"summary":"Get current bank health status","description":"Retrieve the current health status of all custodian banks","operationId":"getBankHealthStatus","responses":{"200":{"description":"Health status retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"summary":{"properties":{"healthy":{"type":"integer"},"degraded":{"type":"integer"},"unhealthy":{"type":"integer"},"unknown":{"type":"integer"}},"type":"object"},"total_custodians":{"type":"integer"},"custodians":{"type":"array","items":{"properties":{"custodian":{"type":"string"},"status":{"type":"string","enum":["healthy","degraded","unhealthy","unknown"]},"overall_failure_rate":{"type":"number"},"last_check":{"type":"string","format":"date-time"},"response_time_ms":{"type":"integer"},"consecutive_failures":{"type":"integer"},"available_since":{"type":"string","format":"date-time"},"last_failure":{"type":"string","format":"date-time"}},"type":"object"}},"checked_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/bank-alerting\/custodian\/{custodian}\/health":{"get":{"tags":["Bank Alerting"],"summary":"Get specific custodian health","description":"Retrieve health status for a specific custodian bank","operationId":"getSpecificCustodianHealth","parameters":[{"name":"custodian","in":"path","description":"Custodian identifier","required":true,"schema":{"type":"string","example":"paysera"}}],"responses":{"200":{"description":"Custodian health retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"custodian":{"type":"string"},"health":{"type":"object"},"checked_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Custodian not found"}},"security":[{"bearerAuth":[]}]}},"\/api\/bank-alerting\/custodian\/{custodian}\/alerts":{"get":{"tags":["Bank Alerting"],"summary":"Get custodian alert history","description":"Retrieve alert history for a specific custodian","operationId":"getCustodianAlertHistory","parameters":[{"name":"custodian","in":"path","description":"Custodian identifier","required":true,"schema":{"type":"string","example":"paysera"}},{"name":"days","in":"query","description":"Number of days to retrieve (1-90)","required":false,"schema":{"type":"integer","default":7,"maximum":90,"minimum":1}}],"responses":{"200":{"description":"Alert history retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"custodian":{"type":"string"},"period_days":{"type":"integer"},"alert_history":{"type":"array","items":{"type":"object"}},"retrieved_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/bank-alerting\/statistics":{"get":{"tags":["Bank Alerting"],"summary":"Get alerting statistics","description":"Retrieve overall alerting system statistics","operationId":"getBankAlertingStatistics","parameters":[{"name":"period","in":"query","description":"Time period for statistics","required":false,"schema":{"type":"string","default":"day","enum":["hour","day","week","month"]}}],"responses":{"200":{"description":"Statistics retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"statistics":{"properties":{"period":{"type":"string"},"total_alerts_sent":{"type":"integer"},"alerts_by_severity":{"type":"object"},"alerts_by_custodian":{"type":"object"},"most_common_issues":{"type":"object"},"alert_response_times":{"type":"object"},"false_positive_rate":{"type":"number"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"}},"type":"object"},"calculated_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/bank-alerting\/configuration":{"get":{"tags":["Bank Alerting"],"summary":"Get alert configuration","description":"Retrieve current alerting system configuration","operationId":"getBankAlertConfiguration","responses":{"200":{"description":"Configuration retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"configuration":{"properties":{"cooldown_minutes":{"type":"integer"},"severity_thresholds":{"type":"object"},"notification_channels":{"type":"array","items":{"type":"string"}},"alert_recipients":{"type":"object"},"last_updated":{"type":"string","format":"date-time"}},"type":"object"},"retrieved_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Bank Alerting"],"summary":"Configure alert settings","description":"Update alerting system configuration","operationId":"configureBankAlerts","requestBody":{"required":false,"content":{"application\/json":{"schema":{"properties":{"cooldown_minutes":{"type":"integer","example":30,"maximum":1440,"minimum":1},"severity_thresholds":{"properties":{"failure_rate_warning":{"type":"number","maximum":100,"minimum":0},"failure_rate_critical":{"type":"number","maximum":100,"minimum":0},"response_time_warning":{"type":"integer","minimum":0},"response_time_critical":{"type":"integer","minimum":0}},"type":"object"},"notification_channels":{"type":"array","items":{"type":"string","enum":["mail","database","slack","webhook"]}}},"type":"object"}}}},"responses":{"200":{"description":"Configuration updated successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"configuration_updated":{"type":"boolean"},"new_configuration":{"type":"object"}},"type":"object"},"message":{"type":"string"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/bank-alerting\/test":{"post":{"tags":["Bank Alerting"],"summary":"Send test alert","description":"Test the alerting system by sending a test alert","operationId":"testBankAlert","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["severity"],"properties":{"severity":{"type":"string","enum":["info","warning","critical"]},"custodian":{"type":"string","example":"test_custodian"},"message":{"type":"string","example":"Test alert from API","maxLength":500}},"type":"object"}}}},"responses":{"200":{"description":"Test alert sent successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"test_alert_sent":{"type":"boolean"},"severity":{"type":"string"},"custodian":{"type":"string"},"message":{"type":"string"},"sent_at":{"type":"string","format":"date-time"}},"type":"object"},"message":{"type":"string"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/bank-alerting\/alerts\/{alertId}\/acknowledge":{"post":{"tags":["Bank Alerting"],"summary":"Acknowledge alert","description":"Mark an alert as acknowledged\/resolved","operationId":"acknowledgeBankAlert","parameters":[{"name":"alertId","in":"path","description":"Alert identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"properties":{"resolution_notes":{"type":"string","maxLength":1000}},"type":"object"}}}},"responses":{"200":{"description":"Alert acknowledged successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"alert_id":{"type":"string"},"acknowledged":{"type":"boolean"},"acknowledged_by":{"type":"string"},"acknowledged_at":{"type":"string","format":"date-time"},"resolution_notes":{"type":"string"}},"type":"object"},"message":{"type":"string"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/bank-allocations":{"get":{"tags":["Bank Allocation"],"summary":"Get user bank allocations","description":"Get current user's bank allocation preferences and distribution","operationId":"7f09bf2f0a59c4cb05e0667327992a28","responses":{"200":{"description":"Bank allocations retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"allocations":{"type":"array","items":{"properties":{"bank_code":{"type":"string","example":"PAYSERA"},"bank_name":{"type":"string","example":"Paysera Bank"},"allocation_percentage":{"type":"number","example":40},"is_primary":{"type":"boolean","example":true},"status":{"type":"string","example":"active"},"metadata":{"properties":{"country":{"type":"string","example":"Lithuania"},"currency":{"type":"string","example":"EUR"},"insurance_limit":{"type":"integer","example":100000}},"type":"object"}},"type":"object"}},"summary":{"properties":{"total_percentage":{"type":"number","example":100},"bank_count":{"type":"integer","example":3},"primary_bank":{"type":"string","example":"PAYSERA"},"is_diversified":{"type":"boolean","example":true},"total_insurance_coverage":{"type":"integer","example":300000}},"type":"object"}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Bank Allocation"],"summary":"Update bank allocations","description":"Update user's bank allocation preferences","operationId":"e93918e4734a1760318359445b6e70ed","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["allocations"],"properties":{"allocations":{"type":"object","example":{"PAYSERA":40,"DEUTSCHE_BANK":30,"SANTANDER":30}},"primary_bank":{"type":"string","example":"PAYSERA"}},"type":"object"}}}},"responses":{"200":{"description":"Bank allocations updated successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Bank allocations updated successfully"},"data":{"properties":{"allocations":{"type":"array","items":{"properties":{"bank_code":{"type":"string","example":"PAYSERA"},"allocation_percentage":{"type":"number","example":40},"is_primary":{"type":"boolean","example":true}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error - allocations must sum to 100%"}},"security":[{"bearerAuth":[]}]}},"\/api\/bank-allocations\/banks":{"post":{"tags":["Bank Allocation"],"summary":"Add bank to allocation","description":"Add a new bank to user's allocation preferences","operationId":"d416fa793400804341373a14153ec81b","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["bank_code","percentage"],"properties":{"bank_code":{"type":"string","example":"REVOLUT"},"percentage":{"type":"number","example":15,"maximum":100,"minimum":0.01}},"type":"object"}}}},"responses":{"201":{"description":"Bank added successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Bank added to allocation successfully"},"data":{"properties":{"bank_code":{"type":"string","example":"REVOLUT"},"bank_name":{"type":"string","example":"Revolut Bank"},"allocation_percentage":{"type":"number","example":15},"is_primary":{"type":"boolean","example":false},"status":{"type":"string","example":"active"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error or bank already exists"}},"security":[{"bearerAuth":[]}]}},"\/api\/bank-allocations\/banks\/{bankCode}":{"delete":{"tags":["Bank Allocation"],"summary":"Remove bank from allocation","description":"Remove a bank from user's allocation preferences","operationId":"7c5865675340447c9aec500aa8438147","parameters":[{"name":"bankCode","in":"path","description":"Bank code to remove","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Bank removed successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Bank removed from allocation successfully"},"data":{"properties":{"bank_code":{"type":"string","example":"REVOLUT"},"removed_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Cannot remove primary bank or bank not found"}},"security":[{"bearerAuth":[]}]}},"\/api\/bank-allocations\/primary\/{bankCode}":{"put":{"tags":["Bank Allocation"],"summary":"Set primary bank","description":"Set a bank as the primary bank for the user","operationId":"93afd9d4dbf1c8f12b368b9af6b51605","parameters":[{"name":"bankCode","in":"path","description":"Bank code to set as primary","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Primary bank updated successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Primary bank updated successfully"},"data":{"properties":{"bank_code":{"type":"string","example":"PAYSERA"},"bank_name":{"type":"string","example":"Paysera Bank"},"is_primary":{"type":"boolean","example":true},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Bank not found in user's allocation"}},"security":[{"bearerAuth":[]}]}},"\/api\/bank-allocations\/available-banks":{"get":{"tags":["Bank Allocation"],"summary":"Get available banks","description":"Get list of all available banks for allocation","operationId":"9f74056b37dd0b5cfa42d9a6d33cf170","responses":{"200":{"description":"Available banks retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"bank_code":{"type":"string","example":"PAYSERA"},"bank_name":{"type":"string","example":"Paysera Bank"},"country":{"type":"string","example":"Lithuania"},"currency":{"type":"string","example":"EUR"},"insurance_limit":{"type":"integer","example":100000},"supported_features":{"type":"array","items":{"type":"string"}}},"type":"object"}}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/bank-allocations\/distribution-preview":{"post":{"tags":["Bank Allocation"],"summary":"Preview fund distribution","description":"Preview how funds would be distributed across banks for a given amount","operationId":"10b4b115c399fe37eb6460468c0ddc28","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["amount","asset_code"],"properties":{"amount":{"type":"number","example":1000,"minimum":0.01},"asset_code":{"type":"string","example":"USD"}},"type":"object"}}}},"responses":{"200":{"description":"Distribution preview generated successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"total_amount":{"type":"number","example":1000},"asset_code":{"type":"string","example":"USD"},"distribution":{"type":"array","items":{"properties":{"bank_code":{"type":"string","example":"PAYSERA"},"bank_name":{"type":"string","example":"Paysera Bank"},"allocation_percentage":{"type":"number","example":40},"amount":{"type":"number","example":400},"is_primary":{"type":"boolean","example":true}},"type":"object"}},"summary":{"properties":{"bank_count":{"type":"integer","example":3},"is_diversified":{"type":"boolean","example":true},"total_insurance_coverage":{"type":"integer","example":300000}},"type":"object"}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v2\/accounts\/{uuid}\/baskets\/decompose":{"post":{"tags":["Basket Operations"],"summary":"Decompose basket holdings into component assets","operationId":"decomposeBasket","parameters":[{"name":"uuid","in":"path","description":"Account UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["basket_code","amount"],"properties":{"basket_code":{"type":"string","example":"STABLE_BASKET"},"amount":{"description":"Amount in smallest unit","type":"integer","example":10000}},"type":"object"}}}},"responses":{"200":{"description":"Basket decomposed successfully","content":{"application\/json":{"schema":{"properties":{"basket_code":{"type":"string"},"basket_amount":{"type":"integer"},"components":{"type":"object"},"decomposed_at":{"type":"string","format":"date-time"}},"type":"object"}}}},"422":{"description":"Validation error or insufficient balance"}},"security":[{"bearerAuth":[]}]}},"\/api\/v2\/accounts\/{uuid}\/baskets\/compose":{"post":{"tags":["Basket Operations"],"summary":"Compose component assets into a basket","operationId":"composeBasket","parameters":[{"name":"uuid","in":"path","description":"Account UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["basket_code","amount"],"properties":{"basket_code":{"type":"string","example":"STABLE_BASKET"},"amount":{"description":"Amount of basket to create","type":"integer","example":10000}},"type":"object"}}}},"responses":{"200":{"description":"Basket composed successfully","content":{"application\/json":{"schema":{"properties":{"basket_code":{"type":"string"},"basket_amount":{"type":"integer"},"components_used":{"type":"object"},"composed_at":{"type":"string","format":"date-time"}},"type":"object"}}}},"422":{"description":"Validation error or insufficient component balances"}},"security":[{"bearerAuth":[]}]}},"\/api\/v2\/accounts\/{uuid}\/baskets":{"get":{"tags":["Basket Operations"],"summary":"Get basket holdings for an account","operationId":"getAccountBaskets","parameters":[{"name":"uuid","in":"path","description":"Account UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Account basket holdings","content":{"application\/json":{"schema":{"properties":{"account_uuid":{"type":"string"},"basket_holdings":{"type":"array","items":{"properties":{"basket_code":{"type":"string"},"basket_name":{"type":"string"},"balance":{"type":"integer"},"unit_value":{"type":"number"},"total_value":{"type":"number"}},"type":"object"}},"total_value":{"type":"number"},"currency":{"type":"string"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v2\/baskets":{"get":{"tags":["Baskets"],"summary":"List all basket assets","operationId":"listBaskets","parameters":[{"name":"type","in":"query","description":"Filter by basket type","required":false,"schema":{"type":"string","enum":["fixed","dynamic"]}},{"name":"active","in":"query","description":"Filter by active status","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"List of basket assets","content":{"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/BasketAsset"}}}}}}},"post":{"tags":["Baskets"],"summary":"Create a new basket","operationId":"createBasket","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["code","name","components"],"properties":{"code":{"type":"string","example":"STABLE_BASKET"},"name":{"type":"string","example":"Stable Currency Basket"},"description":{"type":"string"},"type":{"type":"string","default":"fixed","enum":["fixed","dynamic"]},"rebalance_frequency":{"type":"string","default":"never","enum":["daily","weekly","monthly","quarterly","never"]},"components":{"type":"array","items":{"required":["asset_code","weight"],"properties":{"asset_code":{"type":"string","example":"USD"},"weight":{"type":"number","format":"float","example":40},"min_weight":{"type":"number","format":"float","example":35},"max_weight":{"type":"number","format":"float","example":45}},"type":"object"}}},"type":"object"}}}},"responses":{"201":{"description":"Basket created successfully","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BasketAsset"}}}},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/api\/v2\/baskets\/{code}":{"get":{"tags":["Baskets"],"summary":"Get basket details","operationId":"getBasket","parameters":[{"name":"code","in":"path","description":"Basket code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Basket details","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BasketAsset"}}}},"404":{"description":"Basket not found"}}}},"\/api\/v2\/baskets\/{code}\/value":{"get":{"tags":["Baskets"],"summary":"Get current basket value","operationId":"getBasketValue","parameters":[{"name":"code","in":"path","description":"Basket code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Current basket value","content":{"application\/json":{"schema":{"properties":{"basket_code":{"type":"string"},"value":{"type":"number"},"calculated_at":{"type":"string","format":"date-time"},"component_values":{"type":"object"}},"type":"object"}}}}}}},"\/api\/v2\/baskets\/{code}\/rebalance":{"post":{"tags":["Baskets"],"summary":"Trigger basket rebalancing","operationId":"rebalanceBasket","parameters":[{"name":"code","in":"path","description":"Basket code","required":true,"schema":{"type":"string"}},{"name":"simulate","in":"query","description":"Simulate rebalancing without executing","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Rebalancing result","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string"},"basket":{"type":"string"},"adjustments":{"type":"array","items":{"type":"object"}}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v2\/baskets\/{code}\/history":{"get":{"tags":["Baskets"],"summary":"Get basket value history","operationId":"getBasketHistory","parameters":[{"name":"code","in":"path","description":"Basket code","required":true,"schema":{"type":"string"}},{"name":"days","in":"query","description":"Number of days of history","required":false,"schema":{"type":"integer","default":30}}],"responses":{"200":{"description":"Basket value history"}}}},"\/api\/v2\/baskets\/{code}\/performance":{"get":{"tags":["Baskets"],"summary":"Get basket performance metrics","operationId":"getBasketPerformanceMetrics","parameters":[{"name":"code","in":"path","description":"Basket code","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","description":"Performance period","required":false,"schema":{"type":"string","default":"30d","enum":["1d","7d","30d","90d","1y"]}}],"responses":{"200":{"description":"Basket performance metrics"}}}},"\/api\/baskets\/{code}\/performance":{"get":{"tags":["Basket Performance"],"summary":"Get performance metrics for a basket","operationId":"getBasketPerformance","parameters":[{"name":"code","in":"path","description":"Basket asset code","required":true,"schema":{"type":"string","example":"GCU"}},{"name":"period","in":"query","description":"Performance period","required":false,"schema":{"type":"string","default":"month","enum":["hour","day","week","month","quarter","year","all_time"]}}],"responses":{"200":{"description":"Performance data","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"basket_code":{"type":"string"},"period_type":{"type":"string"},"return_percentage":{"type":"number"},"volatility":{"type":"number"},"sharpe_ratio":{"type":"number"},"max_drawdown":{"type":"number"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/baskets\/{code}\/performance\/history":{"get":{"tags":["Basket Performance"],"summary":"Get historical performance data for a basket","operationId":"getBasketPerformanceHistory","parameters":[{"name":"code","in":"path","description":"Basket asset code","required":true,"schema":{"type":"string","example":"GCU"}},{"name":"period_type","in":"query","description":"Filter by period type","required":false,"schema":{"type":"string","enum":["hour","day","week","month","quarter","year"]}},{"name":"limit","in":"query","description":"Number of records to return","required":false,"schema":{"type":"integer","default":30}}],"responses":{"200":{"description":"Historical performance data","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/BasketPerformance"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/baskets\/{code}\/performance\/summary":{"get":{"tags":["Basket Performance"],"summary":"Get performance summary across multiple periods","operationId":"getBasketPerformanceSummary","parameters":[{"name":"code","in":"path","description":"Basket asset code","required":true,"schema":{"type":"string","example":"GCU"}}],"responses":{"200":{"description":"Performance summary","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"basket_code":{"type":"string"},"basket_name":{"type":"string"},"current_value":{"type":"number"},"performances":{"properties":{"day":{"type":"object"},"week":{"type":"object"},"month":{"type":"object"},"year":{"type":"object"}},"type":"object"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/baskets\/{code}\/performance\/components":{"get":{"tags":["Basket Performance"],"summary":"Get component-level performance breakdown","operationId":"getBasketComponentPerformance","parameters":[{"name":"code","in":"path","description":"Basket asset code","required":true,"schema":{"type":"string","example":"GCU"}},{"name":"period","in":"query","description":"Performance period","required":false,"schema":{"type":"string","default":"month","enum":["hour","day","week","month","quarter","year"]}}],"responses":{"200":{"description":"Component performance data","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ComponentPerformance"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/baskets\/{code}\/performance\/top-performers":{"get":{"tags":["Basket Performance"],"summary":"Get top performing components","operationId":"getBasketTopPerformers","parameters":[{"name":"code","in":"path","description":"Basket asset code","required":true,"schema":{"type":"string","example":"GCU"}},{"name":"period","in":"query","description":"Performance period","required":false,"schema":{"type":"string","default":"month"}},{"name":"limit","in":"query","description":"Number of components to return","required":false,"schema":{"type":"integer","default":5}}],"responses":{"200":{"description":"Top performing components"}},"security":[{"sanctum":[]}]}},"\/api\/baskets\/{code}\/performance\/worst-performers":{"get":{"tags":["Basket Performance"],"summary":"Get worst performing components","operationId":"getBasketWorstPerformers","parameters":[{"name":"code","in":"path","description":"Basket asset code","required":true,"schema":{"type":"string","example":"GCU"}},{"name":"period","in":"query","description":"Performance period","required":false,"schema":{"type":"string","default":"month"}},{"name":"limit","in":"query","description":"Number of components to return","required":false,"schema":{"type":"integer","default":5}}],"responses":{"200":{"description":"Worst performing components"}},"security":[{"sanctum":[]}]}},"\/api\/baskets\/{code}\/performance\/calculate":{"post":{"tags":["Basket Performance"],"summary":"Trigger performance calculation for a basket","operationId":"calculateBasketPerformance","parameters":[{"name":"code","in":"path","description":"Basket asset code","required":true,"schema":{"type":"string","example":"GCU"}}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"properties":{"period":{"type":"string","enum":["all","hour","day","week","month","quarter","year"]}},"type":"object"}}}},"responses":{"200":{"description":"Calculation triggered","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string"},"calculated_periods":{"type":"array","items":{"type":"string"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/baskets\/{code}\/performance\/compare":{"get":{"tags":["Basket Performance"],"summary":"Compare basket performance against benchmarks","operationId":"compareBasketPerformance","parameters":[{"name":"code","in":"path","description":"Basket asset code","required":true,"schema":{"type":"string","example":"GCU"}},{"name":"benchmarks","in":"query","description":"Comma-separated list of benchmark basket codes","required":true,"schema":{"type":"string","example":"USD_STABLE,EUR_STABLE"}}],"responses":{"200":{"description":"Performance comparison data"}},"security":[{"sanctum":[]}]}},"\/api\/batch-operations\/execute":{"post":{"tags":["Batch Processing"],"summary":"Execute batch operations","description":"Execute end-of-day batch processing operations with compensation support","operationId":"ce4b5fc9c19748de39663efc9591ccf2","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["operations"],"properties":{"operations":{"type":"array","items":{"properties":{"type":{"type":"string","example":"account_interest","enum":["account_interest","fee_collection","balance_reconciliation","report_generation"]},"parameters":{"type":"object","example":{"rate":0.05,"date":"2023-12-31"}},"priority":{"type":"integer","example":5,"maximum":10,"minimum":1}},"type":"object"}},"batch_name":{"type":"string","example":"EOD_2023_12_31"},"schedule_time":{"type":"string","format":"date-time","nullable":true},"retry_attempts":{"type":"integer","default":3,"maximum":5,"minimum":0}},"type":"object"}}}},"responses":{"202":{"description":"Batch processing initiated successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Batch processing initiated successfully"},"data":{"properties":{"batch_id":{"type":"string","example":"batch_550e8400_e29b_41d4"},"status":{"type":"string","example":"initiated"},"operations_count":{"type":"integer","example":4},"estimated_duration":{"type":"string","example":"15-30 minutes"},"started_at":{"type":"string","format":"date-time"},"started_by":{"type":"string","example":"admin@finaegis.org"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid batch operation request"},"403":{"description":"Forbidden - Admin access required"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/api\/batch-operations\/{batchId}\/status":{"get":{"tags":["Batch Processing"],"summary":"Get batch operation status","description":"Get the current status and progress of a batch operation","operationId":"a6bb9a2725777f338f91c9c3acda4f15","parameters":[{"name":"batchId","in":"path","description":"Batch ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Batch status retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"batch_id":{"type":"string","example":"batch_550e8400_e29b_41d4"},"status":{"type":"string","example":"running","enum":["initiated","running","completed","failed","compensating"]},"progress":{"type":"integer","example":65,"maximum":100,"minimum":0},"operations_total":{"type":"integer","example":4},"operations_completed":{"type":"integer","example":2},"operations_failed":{"type":"integer","example":0},"current_operation":{"type":"string","example":"balance_reconciliation"},"started_at":{"type":"string","format":"date-time"},"estimated_completion":{"type":"string","format":"date-time"},"error_message":{"type":"string","nullable":true},"operations":{"type":"array","items":{"properties":{"type":{"type":"string","example":"account_interest"},"status":{"type":"string","example":"completed"},"started_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"records_processed":{"type":"integer","example":1250},"error_message":{"type":"string","nullable":true}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"404":{"description":"Batch operation not found"}},"security":[{"bearerAuth":[]}]}},"\/api\/batch-operations":{"get":{"tags":["Batch Processing"],"summary":"Get batch operations history","description":"Get list of recent batch operations with filtering options","operationId":"b5717821f529c8ecfd2dba3f8dc35906","parameters":[{"name":"status","in":"query","description":"Filter by status","schema":{"type":"string","enum":["initiated","running","completed","failed","scheduled"]}},{"name":"date_from","in":"query","description":"Filter from date","schema":{"type":"string","format":"date"}},{"name":"date_to","in":"query","description":"Filter to date","schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","description":"Number of results to return","schema":{"type":"integer","default":20,"maximum":100,"minimum":1}}],"responses":{"200":{"description":"Batch operations history retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"batch_id":{"type":"string","example":"batch_550e8400_e29b_41d4"},"batch_name":{"type":"string","example":"EOD_2023_12_31"},"status":{"type":"string","example":"completed"},"operations_count":{"type":"integer","example":4},"started_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"duration_minutes":{"type":"integer","example":23},"started_by":{"type":"string","example":"admin@finaegis.org"}},"type":"object"}},"pagination":{"properties":{"total":{"type":"integer","example":87},"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/batch-operations\/{batchId}\/cancel":{"post":{"tags":["Batch Processing"],"summary":"Cancel batch operation","description":"Cancel a running or scheduled batch operation with compensation","operationId":"5bdfee16fc012e06ac04d5899b41a4e5","parameters":[{"name":"batchId","in":"path","description":"Batch ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["reason"],"properties":{"reason":{"type":"string","example":"Emergency maintenance required"},"compensate":{"description":"Whether to run compensation for completed operations","type":"boolean","default":true}},"type":"object"}}}},"responses":{"200":{"description":"Batch operation cancelled successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Batch operation cancelled successfully"},"data":{"properties":{"batch_id":{"type":"string","example":"batch_550e8400_e29b_41d4"},"status":{"type":"string","example":"cancelled"},"cancelled_at":{"type":"string","format":"date-time"},"cancelled_by":{"type":"string","example":"admin@finaegis.org"},"compensation_required":{"type":"boolean","example":true}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v1\/blockchain-wallets":{"get":{"tags":["Blockchain Wallets"],"summary":"List blockchain wallets","description":"Returns a list of all blockchain wallets belonging to the authenticated user.","operationId":"blockchainWalletsList","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"wallet_id":{"type":"string","example":"wal_abc123"},"type":{"type":"string","example":"custodial","enum":["custodial","non-custodial"]},"user_id":{"type":"integer","example":1},"settings":{"type":"object"},"created_at":{"type":"string","format":"date-time"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]},"post":{"tags":["Blockchain Wallets"],"summary":"Create a blockchain wallet","description":"Creates a new custodial or non-custodial blockchain wallet for the authenticated user.","operationId":"blockchainWalletsStore","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["type"],"properties":{"type":{"type":"string","example":"custodial","enum":["custodial","non-custodial"]},"mnemonic":{"description":"Required if type is non-custodial","type":"string","example":"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"},"settings":{"properties":{"daily_limit":{"type":"number","example":10000},"requires_2fa":{"type":"boolean","example":true},"whitelisted_addresses":{"type":"array","items":{"type":"string"}}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"Wallet created successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"wallet_id":{"type":"string","example":"wal_abc123"},"type":{"type":"string","example":"custodial"},"user_id":{"type":"integer","example":1},"settings":{"type":"object"},"created_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error or invalid mnemonic"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/blockchain-wallets\/{walletId}":{"get":{"tags":["Blockchain Wallets"],"summary":"Get wallet details","description":"Returns detailed information about a specific blockchain wallet owned by the authenticated user.","operationId":"blockchainWalletsShow","parameters":[{"name":"walletId","in":"path","description":"The wallet ID","required":true,"schema":{"type":"string","example":"wal_abc123"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"wallet_id":{"type":"string","example":"wal_abc123"},"type":{"type":"string","example":"custodial"},"user_id":{"type":"integer","example":1},"settings":{"type":"object"},"created_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Wallet not found"}},"security":[{"sanctum":[]}]},"put":{"tags":["Blockchain Wallets"],"summary":"Update wallet settings","description":"Updates the settings of a specific blockchain wallet owned by the authenticated user.","operationId":"blockchainWalletsUpdate","parameters":[{"name":"walletId","in":"path","description":"The wallet ID","required":true,"schema":{"type":"string","example":"wal_abc123"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["settings"],"properties":{"settings":{"properties":{"daily_limit":{"type":"number","example":10000},"requires_2fa":{"type":"boolean","example":true},"whitelisted_addresses":{"type":"array","items":{"type":"string"}}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"Wallet settings updated","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"wallet_id":{"type":"string","example":"wal_abc123"},"type":{"type":"string","example":"custodial"},"user_id":{"type":"integer","example":1},"settings":{"type":"object"},"created_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Wallet not found"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/blockchain-wallets\/{walletId}\/addresses":{"get":{"tags":["Blockchain Wallets"],"summary":"List wallet addresses","description":"Returns all active addresses for a specific blockchain wallet owned by the authenticated user.","operationId":"blockchainWalletsAddresses","parameters":[{"name":"walletId","in":"path","description":"The wallet ID","required":true,"schema":{"type":"string","example":"wal_abc123"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"wallet_id":{"type":"string","example":"wal_abc123"},"address":{"type":"string","example":"0x1234...abcd"},"chain":{"type":"string","example":"ethereum"},"is_active":{"type":"boolean","example":true},"created_at":{"type":"string","format":"date-time"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Wallet not found"}},"security":[{"sanctum":[]}]},"post":{"tags":["Blockchain Wallets"],"summary":"Generate a new wallet address","description":"Generates a new blockchain address for the specified chain on a wallet owned by the authenticated user.","operationId":"blockchainWalletsGenerateAddress","parameters":[{"name":"walletId","in":"path","description":"The wallet ID","required":true,"schema":{"type":"string","example":"wal_abc123"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["chain"],"properties":{"chain":{"type":"string","example":"ethereum","enum":["ethereum","polygon","bsc","bitcoin"]},"label":{"type":"string","example":"My savings address","maxLength":255}},"type":"object"}}}},"responses":{"200":{"description":"Address generated successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"wallet_id":{"type":"string","example":"wal_abc123"},"address":{"type":"string","example":"0x1234...abcd"},"chain":{"type":"string","example":"ethereum"},"is_active":{"type":"boolean","example":true},"created_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Wallet not found"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/blockchain-wallets\/{walletId}\/transactions":{"get":{"tags":["Blockchain Wallets"],"summary":"List wallet transactions","description":"Returns the transaction history for a specific blockchain wallet, with optional chain and status filters.","operationId":"blockchainWalletsTransactions","parameters":[{"name":"walletId","in":"path","description":"The wallet ID","required":true,"schema":{"type":"string","example":"wal_abc123"}},{"name":"chain","in":"query","description":"Filter by blockchain network","required":false,"schema":{"type":"string","enum":["ethereum","polygon","bsc","bitcoin"]}},{"name":"status","in":"query","description":"Filter by transaction status","required":false,"schema":{"type":"string","enum":["pending","confirmed","failed"]}},{"name":"limit","in":"query","description":"Number of transactions to return (1-100, default 50)","required":false,"schema":{"type":"integer","example":50,"maximum":100,"minimum":1}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"wallet_id":{"type":"string","example":"wal_abc123"},"chain":{"type":"string","example":"ethereum"},"status":{"type":"string","example":"confirmed"},"amount":{"type":"string","example":"1.5"},"tx_hash":{"type":"string","example":"0xabc...def"},"created_at":{"type":"string","format":"date-time"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Wallet not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/blockchain-wallets\/{walletId}\/backup":{"post":{"tags":["Blockchain Wallets"],"summary":"Create wallet backup","description":"Creates a secure backup for a non-custodial blockchain wallet. Only non-custodial wallets can be backed up.","operationId":"blockchainWalletsCreateBackup","parameters":[{"name":"walletId","in":"path","description":"The wallet ID","required":true,"schema":{"type":"string","example":"wal_abc123"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["password"],"properties":{"password":{"type":"string","format":"password","example":"securepass123","minLength":8}},"type":"object"}}}},"responses":{"200":{"description":"Backup created successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Wallet backup created successfully"},"backup_id":{"type":"string","example":"backup_64a1b2c3"},"instructions":{"type":"string","example":"Store your backup securely. You will need it to recover your wallet."}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Wallet not found"},"422":{"description":"Only non-custodial wallets can be backed up"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/blockchain-wallets\/generate-mnemonic":{"post":{"tags":["Blockchain Wallets"],"summary":"Generate mnemonic phrase","description":"Generates a new BIP-39 mnemonic phrase for non-custodial wallet creation.","operationId":"blockchainWalletsGenerateMnemonic","responses":{"200":{"description":"Mnemonic generated successfully","content":{"application\/json":{"schema":{"properties":{"mnemonic":{"type":"string","example":"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"},"word_count":{"type":"integer","example":12},"warning":{"type":"string","example":"Store this mnemonic securely. It cannot be recovered if lost."}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/cards\/provision":{"post":{"tags":["Card Issuance"],"summary":"Provision virtual card for mobile wallet","description":"Provision a new virtual card for Apple Pay \/ Google Pay.","operationId":"27be9954610d75b4766604447538a87a","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["device_id","wallet_type"],"properties":{"device_id":{"type":"string","example":"device_abc123"},"wallet_type":{"type":"string","enum":["apple_pay","google_pay"]},"cardholder_name":{"type":"string","example":"John Doe"}},"type":"object"}}}},"responses":{"200":{"description":"Provisioning data for mobile wallet","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"card_id":{"type":"string"},"encrypted_pass_data":{"type":"string"},"activation_data":{"type":"string"},"ephemeral_public_key":{"type":"string"},"certificate_chain":{"type":"array","items":{"type":"string"}}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/cards":{"get":{"tags":["Card Issuance"],"summary":"List user's virtual cards","description":"Get user's virtual cards.","operationId":"aae025058d4c185cbe1b81c4cbe1c65a","responses":{"200":{"description":"List of cards","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"card_id":{"type":"string"},"last4":{"type":"string","example":"4242"},"network":{"type":"string","example":"visa"},"status":{"type":"string","example":"active"}},"type":"object"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]},"post":{"tags":["Card Issuance"],"summary":"Create a new virtual card","description":"Create a new virtual card.","operationId":"3bc670783af57f3ca487684d2a1bb207","requestBody":{"content":{"application\/json":{"schema":{"properties":{"cardholder_name":{"type":"string","example":"John Doe"},"currency":{"type":"string","example":"USD"},"network":{"type":"string","example":"visa","enum":["visa","mastercard"]},"label":{"type":"string","example":"My Travel Card","maxLength":50}},"type":"object"}}}},"responses":{"201":{"description":"Card created","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"card_token":{"type":"string"},"last4":{"type":"string"},"network":{"type":"string"},"status":{"type":"string"},"label":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"400":{"description":"Card creation failed"},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/cards\/{cardId}":{"get":{"tags":["Card Issuance"],"summary":"Get a specific virtual card","description":"Get a specific card.","operationId":"1a1dd3c4d8aa3ae5754297bceb41a06b","parameters":[{"name":"cardId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Card details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"type":"object"}}}},"404":{"description":"Card not found"}},"security":[{"sanctum":[]}]},"delete":{"tags":["Card Issuance"],"summary":"Cancel a virtual card permanently (requires biometric auth)","description":"Cancel a virtual card (requires biometric authentication).","operationId":"8a3be95d59931a059c46b3e8b87fbe47","parameters":[{"name":"cardId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["biometric_token"],"properties":{"biometric_token":{"description":"Biometric JWT or demo HMAC token","type":"string","maxLength":2048,"minLength":32},"reason":{"type":"string","example":"User requested cancellation"}},"type":"object"}}}},"responses":{"200":{"description":"Card cancelled"},"403":{"description":"Biometric verification failed"},"404":{"description":"Card not found"},"422":{"description":"Validation error"},"503":{"description":"Biometric service unavailable"}},"security":[{"sanctum":[]}]},"patch":{"tags":["Card Issuance"],"summary":"Update card settings (nickname, network preference, notifications)","description":"Update card settings.","operationId":"d4c82eae337bba9946abb51da32c4a16","parameters":[{"name":"cardId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"network_preference":{"type":"string","enum":["visa","mastercard"]},"nickname":{"type":"string","example":"Travel Card","maxLength":50},"notifications_enabled":{"type":"boolean","example":true}},"type":"object"}}}},"responses":{"200":{"description":"Card settings updated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Card settings updated"}},"type":"object"}}}},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/cards\/{cardId}\/transactions":{"get":{"tags":["Card Issuance"],"summary":"Get transactions for a virtual card","description":"Get transactions for a card.","operationId":"5f52eca54f1ac1856b885477a9b2301f","parameters":[{"name":"cardId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Card transactions","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"id":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"merchant":{"type":"string"},"category":{"type":"string"},"status":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}},"type":"object"}},"pagination":{"properties":{"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"},"total":{"type":"integer"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/cards\/{cardId}\/freeze":{"post":{"tags":["Card Issuance"],"summary":"Freeze a virtual card","description":"Freeze a virtual card.","operationId":"b57ba2cbe1c13c6a93d14004f9e12dbe","parameters":[{"name":"cardId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Card frozen"},"404":{"description":"Card not found"}},"security":[{"sanctum":[]}]},"delete":{"tags":["Card Issuance"],"summary":"Unfreeze a virtual card","description":"Unfreeze a virtual card.","operationId":"e1c961330d7e4ca4cfe63bd1b2620a5d","parameters":[{"name":"cardId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Card unfrozen"},"404":{"description":"Card not found"}},"security":[{"sanctum":[]}]}},"\/api\/webhooks\/card-issuer\/transaction":{"post":{"tags":["Card Webhooks"],"summary":"Card transaction sync webhook","description":"Handle card transaction webhook.","operationId":"98de2952623d922729b6fda2ae617e25","requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"event_type":{"type":"string","example":"transaction.created"},"data":{"type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"Webhook processed"}}}},"\/api\/v1\/cardholders":{"get":{"tags":["Card Issuance"],"summary":"List cardholders","description":"List cardholders for the authenticated user.","operationId":"98e2b57cc7a02b536af970af04b92dd3","responses":{"200":{"description":"List of cardholders","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]},"post":{"tags":["Card Issuance"],"summary":"Create cardholder","description":"Create a new cardholder.","operationId":"d045dc59a95ba843685ac934b6c69a05","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["first_name","last_name"],"properties":{"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"email":{"type":"string","example":"john@example.com"},"phone":{"type":"string"},"shipping_address_line1":{"type":"string"},"shipping_city":{"type":"string"},"shipping_state":{"type":"string"},"shipping_postal_code":{"type":"string"},"shipping_country":{"type":"string","example":"US"}},"type":"object"}}}},"responses":{"201":{"description":"Cardholder created"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/cardholders\/{id}":{"get":{"tags":["Card Issuance"],"summary":"Get cardholder details","description":"Get a cardholder by ID.","operationId":"ba0c3fa4c83f986e77e717ed5865ee28","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cardholder details"}},"security":[{"sanctum":[]}]}},"\/api\/webhooks\/card-issuer\/authorization":{"post":{"tags":["Card Webhooks"],"summary":"JIT funding authorization webhook","description":"Handle card authorization webhook from issuer.\n\nCRITICAL: This endpoint has a 2000ms latency budget.","operationId":"cccbed5d0d2800162fec3633046d8daa","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["authorization_id","card_token","amount","currency","merchant_name"],"properties":{"authorization_id":{"type":"string"},"card_token":{"type":"string"},"amount":{"description":"Amount in cents","type":"integer"},"currency":{"type":"string","example":"USD"},"merchant_name":{"type":"string"},"merchant_category":{"type":"string"},"merchant_id":{"type":"string"},"merchant_city":{"type":"string"},"merchant_country":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Authorization decision","content":{"application\/json":{"schema":{"properties":{"approved":{"type":"boolean"},"hold_id":{"type":"string","nullable":true},"decline_reason":{"type":"string","nullable":true}},"type":"object"}}}}}}},"\/api\/webhooks\/card-issuer\/settlement":{"post":{"tags":["Card Webhooks"],"summary":"Card settlement webhook","description":"Handle settlement webhook (post-authorization).","operationId":"177c0908d9a9be88e094ec79c7b69af9","requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"authorization_id":{"type":"string"},"settlement_id":{"type":"string"},"final_amount":{"type":"integer"},"currency":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Settlement acknowledged"}}}},"\/api\/v1\/commerce\/merchants":{"get":{"tags":["Commerce"],"summary":"List available merchants","description":"Returns a list of available merchants that accept crypto payments.","operationId":"commerceMerchants","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"id":{"type":"string","example":"merchant_demo_001"},"display_name":{"type":"string","example":"Demo Coffee Shop"},"category":{"type":"string","example":"food_beverage"},"accepted_tokens":{"type":"array","items":{"type":"string","example":"USDC"}},"accepted_networks":{"type":"array","items":{"type":"string","example":"polygon"}},"icon_url":{"type":"string","example":null,"nullable":true},"active":{"type":"boolean","example":true}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/commerce\/parse-qr":{"post":{"tags":["Commerce"],"summary":"Parse a merchant QR code","description":"Parses a merchant QR code string and extracts payment details such as merchant ID, amount, asset, and network.","operationId":"commerceParseQr","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["qr_data"],"properties":{"qr_data":{"description":"The raw QR code data string","type":"string","example":"finaegis:\/\/pay?merchant=merchant_demo_001&amount=25.00&asset=USDC&network=polygon"}},"type":"object"}}}},"responses":{"200":{"description":"QR code parsed successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"merchant_id":{"type":"string","example":"merchant_demo_001"},"amount":{"type":"string","example":"25.00"},"asset":{"type":"string","example":"USDC"},"network":{"type":"string","example":"polygon"},"metadata":{"type":"object"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Invalid QR code or validation error","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"INVALID_QR"},"message":{"type":"string","example":"Unable to parse QR code."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/commerce\/payment-requests":{"post":{"tags":["Commerce"],"summary":"Create a payment request","description":"Creates a new payment request for a merchant with a specified amount, asset, and network. The request expires after 15 minutes.","operationId":"commerceCreatePaymentRequest","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["merchant_id","amount","asset","network"],"properties":{"merchant_id":{"description":"The merchant ID to create the payment request for","type":"string","example":"merchant_demo_001"},"amount":{"description":"The payment amount","type":"string","example":"25.00"},"asset":{"description":"The token asset for payment","type":"string","example":"USDC","enum":["USDC","USDT","WETH","WBTC"]},"network":{"description":"The blockchain network for the transaction","type":"string","example":"polygon"}},"type":"object"}}}},"responses":{"201":{"description":"Payment request created successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"id":{"type":"string","example":"pr_abc123def456"},"merchant_id":{"type":"string","example":"merchant_demo_001"},"merchant":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"display_name":{"type":"string"},"category":{"type":"string","nullable":true},"accepted_tokens":{"type":"array","items":{"type":"string"}}},"type":"object"},"amount":{"type":"string","example":"25.00"},"asset":{"type":"string","example":"USDC"},"network":{"type":"string","example":"polygon"},"status":{"type":"string","example":"pending"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/commerce\/payments":{"post":{"tags":["Commerce"],"summary":"Process a commerce payment","description":"Processes a payment for an existing payment request. Initiates the blockchain transaction for the commerce payment.","operationId":"commerceProcessPayment","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["payment_request_id"],"properties":{"payment_request_id":{"description":"The payment request ID to process","type":"string","example":"pr_abc123def456"}},"type":"object"}}}},"responses":{"201":{"description":"Payment processing initiated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"id":{"type":"string","example":"pay_abc123def456"},"payment_request_id":{"type":"string","example":"pr_abc123def456"},"status":{"type":"string","example":"processing"},"created_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/commerce\/generate-qr":{"post":{"tags":["Commerce"],"summary":"Generate a payment QR code","description":"Generates a QR code data string for receiving a payment. The QR code expires after 30 minutes.","operationId":"commerceGenerateQr","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["amount","asset","network"],"properties":{"amount":{"description":"The payment amount","type":"string","example":"25.00"},"asset":{"description":"The token asset for payment","type":"string","example":"USDC","enum":["USDC","USDT","WETH","WBTC"]},"network":{"description":"The blockchain network for the transaction","type":"string","example":"polygon"}},"type":"object"}}}},"responses":{"200":{"description":"QR code generated successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"qr_data":{"type":"string","example":"finaegis:\/\/pay?to=user_1&amount=25.00&asset=USDC&network=polygon"},"expires_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/commerce\/merchants\/{merchantId}":{"get":{"tags":["Commerce"],"summary":"Get merchant details","description":"Get merchant detail.","operationId":"commerceMerchantDetail","parameters":[{"name":"merchantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Merchant details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"type":"object"}}}},"404":{"description":"Merchant not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/commerce\/payment-requests\/{paymentId}":{"get":{"tags":["Commerce"],"summary":"Get payment request details","description":"Get payment request detail.","operationId":"commercePaymentRequestDetail","parameters":[{"name":"paymentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Payment request details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/commerce\/payment-requests\/{paymentId}\/cancel":{"post":{"tags":["Commerce"],"summary":"Cancel a payment request","description":"Cancel a payment request.","operationId":"commerceCancelPaymentRequest","parameters":[{"name":"paymentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Payment request cancelled","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"id":{"type":"string"},"status":{"type":"string","example":"cancelled"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/commerce\/payments\/recent":{"get":{"tags":["Commerce"],"summary":"Get recent commerce payments","description":"Get recent payments.","operationId":"commerceRecentPayments","responses":{"200":{"description":"Recent payments","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/compliance\/check-address":{"get":{"tags":["Compliance"],"summary":"Screen a blockchain address against sanctions lists","description":"Checks whether a blockchain address appears on any sanctions lists using the configured screening provider.","operationId":"complianceCheckAddress","parameters":[{"name":"address","in":"query","description":"The blockchain address to screen","required":true,"schema":{"type":"string","example":"0x1234567890abcdef1234567890abcdef12345678"}},{"name":"network","in":"query","description":"Blockchain network (default: ethereum)","required":false,"schema":{"type":"string","example":"ethereum"}}],"responses":{"200":{"description":"Sanctions check result","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"sanctioned":{"type":"boolean","example":false},"risk_score":{"type":"string","example":"low"},"provider":{"type":"string","example":"chainalysis"},"details":{"type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"},"429":{"description":"Rate limit exceeded"},"503":{"description":"Screening service unavailable"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/alerts":{"get":{"tags":["Compliance Alerts"],"summary":"Get compliance alerts","description":"Retrieve compliance alerts with filtering options","operationId":"getComplianceAlerts","parameters":[{"name":"status","in":"query","description":"Filter by status","required":false,"schema":{"type":"string","enum":["new","assigned","investigating","escalated","resolved","closed"]}},{"name":"severity","in":"query","description":"Filter by severity","required":false,"schema":{"type":"string","enum":["low","medium","high","critical"]}},{"name":"type","in":"query","description":"Filter by alert type","required":false,"schema":{"type":"string"}},{"name":"assigned_to","in":"query","description":"Filter by assigned user ID","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer","default":1}}],"responses":{"200":{"description":"List of compliance alerts","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]},"post":{"tags":["Compliance Alerts"],"summary":"Create alert","description":"Create a new compliance alert","operationId":"createComplianceAlert","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["type","severity","description"],"properties":{"type":{"type":"string"},"severity":{"type":"string","enum":["low","medium","high","critical"]},"description":{"type":"string"},"entity_type":{"type":"string"},"entity_id":{"type":"string"},"details":{"type":"object"}},"type":"object"}}}},"responses":{"201":{"description":"Alert created successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/alerts\/{id}":{"get":{"tags":["Compliance Alerts"],"summary":"Get alert details","description":"Retrieve detailed information about a specific compliance alert","operationId":"getComplianceAlert","parameters":[{"name":"id","in":"path","description":"Alert ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Alert details","content":{"application\/json":{"schema":[]}}},"404":{"description":"Alert not found"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/alerts\/{id}\/status":{"put":{"tags":["Compliance Alerts"],"summary":"Update alert status","description":"Update the status of a compliance alert","operationId":"updateAlertStatus","parameters":[{"name":"id","in":"path","description":"Alert ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["status"],"properties":{"status":{"type":"string","enum":["new","assigned","investigating","escalated","resolved","closed"]},"notes":{"type":"string"},"resolution":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Status updated successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/alerts\/{id}\/assign":{"put":{"tags":["Compliance Alerts"],"summary":"Assign alert","description":"Assign a compliance alert to a user","operationId":"assignAlert","parameters":[{"name":"id","in":"path","description":"Alert ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["user_id"],"properties":{"user_id":{"type":"integer"},"notes":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Alert assigned successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/alerts\/{id}\/notes":{"post":{"tags":["Compliance Alerts"],"summary":"Add investigation note","description":"Add an investigation note to a compliance alert","operationId":"addAlertNote","parameters":[{"name":"id","in":"path","description":"Alert ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["note"],"properties":{"note":{"type":"string"},"findings":{"type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"Note added successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/alerts\/link":{"post":{"tags":["Compliance Alerts"],"summary":"Link related alerts","description":"Link multiple related compliance alerts","operationId":"linkAlerts","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["alert_ids","relationship_type"],"properties":{"alert_ids":{"type":"array","items":{"type":"string"}},"relationship_type":{"type":"string"},"notes":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Alerts linked successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/alerts\/create-case":{"post":{"tags":["Compliance Alerts"],"summary":"Create case from alerts","description":"Create a compliance case from multiple alerts","operationId":"createCaseFromAlerts","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["alert_ids","title"],"properties":{"alert_ids":{"type":"array","items":{"type":"string"}},"title":{"type":"string"},"description":{"type":"string"},"priority":{"type":"string","enum":["low","medium","high","critical"]}},"type":"object"}}}},"responses":{"201":{"description":"Case created successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/alerts\/statistics":{"get":{"tags":["Compliance Alerts"],"summary":"Get alert statistics","description":"Get statistics and metrics for compliance alerts","operationId":"getAlertStatistics","parameters":[{"name":"period","in":"query","description":"Time period for statistics","required":false,"schema":{"type":"string","enum":["today","week","month","quarter","year"]}}],"responses":{"200":{"description":"Alert statistics","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/alerts\/trends":{"get":{"tags":["Compliance Alerts"],"summary":"Get alert trends","description":"Get trend analysis for compliance alerts","operationId":"getAlertTrends","parameters":[{"name":"days","in":"query","description":"Number of days for trend analysis","required":false,"schema":{"type":"integer","default":30}}],"responses":{"200":{"description":"Alert trends","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/alerts\/search":{"post":{"tags":["Compliance Alerts"],"summary":"Search alerts","description":"Search compliance alerts with advanced filters","operationId":"searchAlerts","requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"query":{"type":"string"},"entity_type":{"type":"string"},"date_from":{"type":"string","format":"date"},"date_to":{"type":"string","format":"date"},"min_severity":{"type":"string"},"include_resolved":{"type":"boolean"}},"type":"object"}}}},"responses":{"200":{"description":"Search results","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/cases":{"get":{"tags":["Compliance Cases"],"summary":"Get compliance cases","description":"Retrieve compliance cases with filtering options","operationId":"getComplianceCases","parameters":[{"name":"status","in":"query","description":"Filter by status","required":false,"schema":{"type":"string","enum":["open","investigating","pending_review","resolved","closed"]}},{"name":"priority","in":"query","description":"Filter by priority","required":false,"schema":{"type":"string","enum":["low","medium","high","critical"]}},{"name":"assigned_to","in":"query","description":"Filter by assigned user ID","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer","default":1}}],"responses":{"200":{"description":"List of compliance cases","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]},"post":{"tags":["Compliance Cases"],"summary":"Create case","description":"Create a new compliance case","operationId":"createComplianceCase","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["title","priority"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"priority":{"type":"string","enum":["low","medium","high","critical"]},"entities":{"type":"array","items":{"type":"object"}},"evidence":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"responses":{"201":{"description":"Case created successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/cases\/{id}":{"get":{"tags":["Compliance Cases"],"summary":"Get case details","description":"Retrieve detailed information about a specific compliance case","operationId":"getComplianceCase","parameters":[{"name":"id","in":"path","description":"Case ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Case details","content":{"application\/json":{"schema":[]}}},"404":{"description":"Case not found"}},"security":[{"sanctum":[]}]},"put":{"tags":["Compliance Cases"],"summary":"Update case","description":"Update a compliance case","operationId":"updateComplianceCase","parameters":[{"name":"id","in":"path","description":"Case ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"title":{"type":"string"},"description":{"type":"string"},"priority":{"type":"string","enum":["low","medium","high","critical"]},"status":{"type":"string","enum":["open","investigating","pending_review","resolved","closed"]}},"type":"object"}}}},"responses":{"200":{"description":"Case updated successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]},"delete":{"tags":["Compliance Cases"],"summary":"Delete case","description":"Delete a compliance case (soft delete)","operationId":"deleteComplianceCase","parameters":[{"name":"id","in":"path","description":"Case ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Case deleted successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/cases\/{id}\/assign":{"put":{"tags":["Compliance Cases"],"summary":"Assign case","description":"Assign a compliance case to a user","operationId":"assignCase","parameters":[{"name":"id","in":"path","description":"Case ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["user_id"],"properties":{"user_id":{"type":"integer"},"notes":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Case assigned successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/cases\/{id}\/evidence":{"post":{"tags":["Compliance Cases"],"summary":"Add evidence","description":"Add evidence to a compliance case","operationId":"addCaseEvidence","parameters":[{"name":"id","in":"path","description":"Case ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["type","description"],"properties":{"type":{"type":"string"},"description":{"type":"string"},"data":{"type":"object"},"source":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Evidence added successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/cases\/{id}\/notes":{"post":{"tags":["Compliance Cases"],"summary":"Add case note","description":"Add a note to a compliance case","operationId":"addCaseNote","parameters":[{"name":"id","in":"path","description":"Case ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["note"],"properties":{"note":{"type":"string"},"type":{"type":"string","enum":["general","investigation","review","decision"]}},"type":"object"}}}},"responses":{"200":{"description":"Note added successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/cases\/{id}\/escalate":{"post":{"tags":["Compliance Cases"],"summary":"Escalate case","description":"Escalate a compliance case","operationId":"escalateCase","parameters":[{"name":"id","in":"path","description":"Case ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["reason"],"properties":{"reason":{"type":"string"},"escalate_to":{"type":"integer"}},"type":"object"}}}},"responses":{"200":{"description":"Case escalated successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/cases\/{id}\/timeline":{"get":{"tags":["Compliance Cases"],"summary":"Get case timeline","description":"Get the timeline of events for a compliance case","operationId":"getCaseTimeline","parameters":[{"name":"id","in":"path","description":"Case ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Case timeline","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certification\/evidence":{"get":{"tags":["Compliance Certification"],"summary":"Get SOC 2 compliance evidence","description":"Returns SOC 2 compliance evidence with optional period and type filters","operationId":"complianceCertificationGetEvidence","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certification\/evidence\/collect":{"post":{"tags":["Compliance Certification"],"summary":"Collect SOC 2 compliance evidence","description":"Initiates SOC 2 compliance evidence collection for a given period","operationId":"complianceCertificationCollectEvidence","responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certification\/access-review":{"get":{"tags":["Compliance Certification"],"summary":"Get access review report","description":"Returns the access review report for SOC 2 compliance","operationId":"complianceCertificationGetAccessReview","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certification\/access-review\/privileged-users":{"get":{"tags":["Compliance Certification"],"summary":"Get privileged users list","description":"Returns a list of privileged users for access review","operationId":"complianceCertificationGetPrivilegedUsers","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certification\/incidents":{"get":{"tags":["Compliance Certification"],"summary":"Get incidents list","description":"Returns incidents with optional status and severity filters","operationId":"complianceCertificationGetIncidents","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]},"post":{"tags":["Compliance Certification"],"summary":"Create a new incident","description":"Creates a new security incident for incident response tracking","operationId":"complianceCertificationCreateIncident","responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certification\/incidents\/{id}":{"put":{"tags":["Compliance Certification"],"summary":"Update an existing incident","description":"Updates an existing security incident with new information","operationId":"complianceCertificationUpdateIncident","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certification\/incidents\/{id}\/resolve":{"post":{"tags":["Compliance Certification"],"summary":"Resolve an incident","description":"Resolves a security incident with a resolution description","operationId":"complianceCertificationResolveIncident","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certification\/incidents\/{id}\/postmortem":{"get":{"tags":["Compliance Certification"],"summary":"Get incident postmortem report","description":"Returns the postmortem report for a resolved incident","operationId":"complianceCertificationGetPostmortem","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certification\/pci\/classification":{"get":{"tags":["Compliance Certification"],"summary":"Get data classification report","description":"Returns the PCI DSS data classification report","operationId":"complianceCertificationGetDataClassification","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certification\/pci\/encryption":{"get":{"tags":["Compliance Certification"],"summary":"Run encryption verification suite","description":"Returns the PCI DSS encryption verification results","operationId":"complianceCertificationGetEncryptionVerification","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certification\/pci\/key-rotation":{"get":{"tags":["Compliance Certification"],"summary":"Get key rotation status report","description":"Returns the PCI DSS key rotation status report","operationId":"complianceCertificationGetKeyRotationStatus","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certification\/pci\/key-rotation\/rotate":{"post":{"tags":["Compliance Certification"],"summary":"Rotate a specific key","description":"Rotates a specific encryption key (demo-safe with dry_run option)","operationId":"complianceCertificationRotateKey","responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certification\/pci\/network-segmentation":{"get":{"tags":["Compliance Certification"],"summary":"Get network segmentation verification report","description":"Returns the PCI DSS network segmentation verification report","operationId":"complianceCertificationGetNetworkSegmentation","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certification\/data-residency\/status":{"get":{"tags":["Compliance Certification"],"summary":"Get data residency status","description":"Returns data residency status for current tenant or specified region","operationId":"complianceCertificationGetResidencyStatus","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certification\/data-residency\/transfers":{"get":{"tags":["Compliance Certification"],"summary":"Get cross-region data transfer logs","description":"Returns cross-region data transfer logs with optional region filters","operationId":"complianceCertificationGetTransferLogs","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]},"post":{"tags":["Compliance Certification"],"summary":"Log a cross-region data transfer","description":"Records a cross-region data transfer for compliance tracking","operationId":"complianceCertificationLogTransfer","responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certification\/data-residency\/routing":{"get":{"tags":["Compliance Certification"],"summary":"Get geo-routing configuration","description":"Returns geo-routing configuration and available regions","operationId":"complianceCertificationGetRoutingConfig","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/dashboard":{"get":{"tags":["Compliance"],"summary":"Get compliance dashboard overview","description":"Returns the overall compliance dashboard with scores, KYC rates, pending reviews, violations, and audit dates.","operationId":"complianceDashboard","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"success"},"data":{"properties":{"overall_compliance_score":{"type":"number","format":"float","example":94.5},"kyc_completion_rate":{"type":"number","format":"float","example":98.2},"pending_reviews":{"type":"integer","example":12},"active_violations":{"type":"integer","example":3},"last_audit_date":{"type":"string","format":"date","example":"2025-01-03"},"next_audit_date":{"type":"string","format":"date","example":"2025-02-03"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/violations":{"get":{"tags":["Compliance"],"summary":"List all compliance violations","description":"Returns a list of all compliance violations.","operationId":"complianceGetViolations","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"success"},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/violations\/{id}":{"get":{"tags":["Compliance"],"summary":"Get violation details","description":"Returns detailed information about a specific compliance violation.","operationId":"complianceGetViolationDetails","parameters":[{"name":"id","in":"path","description":"Violation ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"success"},"data":{"type":"object","nullable":true}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Violation not found"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/violations\/{id}\/resolve":{"post":{"tags":["Compliance"],"summary":"Resolve a compliance violation","description":"Marks a specific compliance violation as resolved.","operationId":"complianceResolveViolation","parameters":[{"name":"id","in":"path","description":"Violation ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"success"},"message":{"type":"string","example":"Violation resolved successfully"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Violation not found"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/rules":{"get":{"tags":["Compliance"],"summary":"List all compliance rules","description":"Returns a list of all configured compliance rules.","operationId":"complianceGetComplianceRules","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"success"},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/rules\/{jurisdiction}":{"get":{"tags":["Compliance"],"summary":"Get compliance rules by jurisdiction","description":"Returns compliance rules filtered by a specific jurisdiction.","operationId":"complianceGetRulesByJurisdiction","parameters":[{"name":"jurisdiction","in":"path","description":"Jurisdiction code (e.g., US, EU, UK)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"success"},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Jurisdiction not found"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/checks":{"get":{"tags":["Compliance"],"summary":"List all compliance checks","description":"Returns a list of all compliance checks that have been performed.","operationId":"complianceGetComplianceChecks","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"success"},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/checks\/run":{"post":{"tags":["Compliance"],"summary":"Run a compliance check","description":"Initiates a new compliance check with the provided parameters.","operationId":"complianceRunComplianceCheck","requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"check_type":{"description":"Type of compliance check to run","type":"string","example":"full_audit"},"scope":{"description":"Scope of the check","type":"string","example":"all_accounts"},"parameters":{"description":"Additional check parameters","type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"success"},"message":{"type":"string","example":"Compliance check initiated"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certifications":{"get":{"tags":["Compliance"],"summary":"List all compliance certifications","description":"Returns a list of all compliance certifications and their statuses.","operationId":"complianceGetCertifications","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"success"},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/certifications\/renew":{"post":{"tags":["Compliance"],"summary":"Renew a compliance certification","description":"Initiates the renewal process for a compliance certification.","operationId":"complianceRenewCertification","requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"certification_id":{"description":"ID of the certification to renew","type":"string"},"renewal_type":{"description":"Type of renewal","type":"string","example":"standard"},"notes":{"description":"Additional notes for the renewal","type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"success"},"message":{"type":"string","example":"Certification renewal initiated"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/policies":{"get":{"tags":["Compliance"],"summary":"List all compliance policies","description":"Returns a list of all compliance policies.","operationId":"complianceGetPolicies","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"success"},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/policies\/{id}":{"put":{"tags":["Compliance"],"summary":"Update a compliance policy","description":"Updates a specific compliance policy with the provided data.","operationId":"complianceUpdatePolicy","parameters":[{"name":"id","in":"path","description":"Policy ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"name":{"description":"Policy name","type":"string"},"description":{"description":"Policy description","type":"string"},"rules":{"description":"Policy rules","type":"array","items":{"type":"object"}},"status":{"description":"Policy status","type":"string","example":"active"}},"type":"object"}}}},"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"success"},"message":{"type":"string","example":"Policy updated successfully"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Policy not found"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/crosschain\/chains":{"get":{"tags":["CrossChain"],"summary":"List supported chains with bridge availability","description":"Returns all supported blockchain networks and their bridge provider availability.","operationId":"crosschainChains","responses":{"200":{"description":"List of supported chains","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"network":{"type":"string","example":"ethereum"},"chain_id":{"type":"integer","example":1,"nullable":true},"is_evm":{"type":"boolean","example":true},"native_currency":{"type":"string","example":"ETH"},"bridge_providers":{"type":"array","items":{"type":"string"},"example":["wormhole","layerzero","axelar"]}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/crosschain\/bridge\/quote":{"post":{"tags":["CrossChain"],"summary":"Get bridge quotes from all available providers","description":"Fetches bridge transfer quotes from all supported bridge providers (Wormhole, LayerZero, Axelar) for the given source\/destination chain, token, and amount.","operationId":"crosschainBridgeQuote","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["from_chain","to_chain","token","amount"],"properties":{"from_chain":{"type":"string","example":"ethereum","enum":["ethereum","polygon","bsc","bitcoin","solana","tron","arbitrum","optimism","base"]},"to_chain":{"type":"string","example":"polygon","enum":["ethereum","polygon","bsc","bitcoin","solana","tron","arbitrum","optimism","base"]},"token":{"type":"string","example":"USDC","maxLength":20},"amount":{"description":"Numeric amount as string","type":"string","example":"1000.50"}},"type":"object"}}}},"responses":{"200":{"description":"Bridge quotes retrieved","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"provider":{"type":"string","example":"wormhole"},"from_chain":{"type":"string","example":"ethereum"},"to_chain":{"type":"string","example":"polygon"},"token":{"type":"string","example":"USDC"},"amount":{"type":"string","example":"1000.50"},"fee":{"type":"string","example":"2.50"},"estimated_time_seconds":{"type":"integer","example":900},"output_amount":{"type":"string","example":"998.00"}},"type":"object"}}},"type":"object"}}}},"400":{"description":"Quote retrieval failed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"ERR_CROSSCHAIN_001"},"message":{"type":"string","example":"Bridge quote failed"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/crosschain\/bridge\/initiate":{"post":{"tags":["CrossChain"],"summary":"Initiate a cross-chain bridge transfer","description":"Selects the best available bridge quote and initiates the cross-chain transfer from sender to recipient address.","operationId":"crosschainBridgeInitiate","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["from_chain","to_chain","token","amount","sender_address","recipient_address"],"properties":{"from_chain":{"type":"string","example":"ethereum","enum":["ethereum","polygon","bsc","bitcoin","solana","tron","arbitrum","optimism","base"]},"to_chain":{"type":"string","example":"arbitrum","enum":["ethereum","polygon","bsc","bitcoin","solana","tron","arbitrum","optimism","base"]},"token":{"type":"string","example":"USDC","maxLength":20},"amount":{"description":"Numeric amount as string","type":"string","example":"500.00"},"sender_address":{"type":"string","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","maxLength":100},"recipient_address":{"type":"string","example":"0x8ba1f109551bD432803012645Ac136ddd64DBA72","maxLength":100}},"type":"object"}}}},"responses":{"200":{"description":"Bridge transfer initiated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"transaction_id":{"type":"string","example":"bridge-tx-abc123"},"status":{"type":"string","example":"pending"},"quote":{"properties":{"provider":{"type":"string","example":"wormhole"},"from_chain":{"type":"string","example":"ethereum"},"to_chain":{"type":"string","example":"arbitrum"},"token":{"type":"string","example":"USDC"},"amount":{"type":"string","example":"500.00"},"fee":{"type":"string","example":"1.25"},"estimated_time_seconds":{"type":"integer","example":600}},"type":"object"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Bridge initiation failed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"ERR_CROSSCHAIN_002"},"message":{"type":"string","example":"Bridge initiation failed"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/crosschain\/bridge\/{id}\/status":{"get":{"tags":["CrossChain"],"summary":"Get bridge transaction status","description":"Retrieves the current status and details of a previously initiated bridge transaction.","operationId":"crosschainBridgeStatus","parameters":[{"name":"id","in":"path","description":"Bridge transaction ID","required":true,"schema":{"type":"string","example":"bridge-tx-abc123"}}],"responses":{"200":{"description":"Bridge transaction status","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"transaction_id":{"type":"string","example":"bridge-tx-abc123"},"status":{"type":"string","example":"completed"},"from_chain":{"type":"string","example":"ethereum"},"to_chain":{"type":"string","example":"polygon"},"token":{"type":"string","example":"USDC"},"amount":{"type":"string","example":"1000.50"},"provider":{"type":"string","example":"wormhole"},"source_tx_hash":{"type":"string","nullable":true},"destination_tx_hash":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Bridge transaction not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"ERR_CROSSCHAIN_003"},"message":{"type":"string","example":"Bridge transaction not found."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/crosschain\/swap\/quote":{"post":{"tags":["CrossChain"],"summary":"Get a cross-chain swap quote","description":"Gets a combined bridge + swap quote for swapping tokens across different chains. The quote includes bridge fees, swap fees, estimated output, and execution time.","operationId":"crosschainSwapQuote","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["from_chain","to_chain","from_token","to_token","amount"],"properties":{"from_chain":{"type":"string","example":"ethereum","enum":["ethereum","polygon","bsc","bitcoin","solana","tron","arbitrum","optimism","base"]},"to_chain":{"type":"string","example":"polygon","enum":["ethereum","polygon","bsc","bitcoin","solana","tron","arbitrum","optimism","base"]},"from_token":{"type":"string","example":"ETH","maxLength":20},"to_token":{"type":"string","example":"USDC","maxLength":20},"amount":{"description":"Numeric amount as string","type":"string","example":"1.5"}},"type":"object"}}}},"responses":{"200":{"description":"Cross-chain swap quote","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"from_chain":{"type":"string","example":"ethereum"},"to_chain":{"type":"string","example":"polygon"},"from_token":{"type":"string","example":"ETH"},"to_token":{"type":"string","example":"USDC"},"input_amount":{"type":"string","example":"1.5"},"output_amount":{"type":"string","example":"2950.00"},"bridge_fee":{"type":"string","example":"3.50"},"swap_fee":{"type":"string","example":"1.25"},"estimated_time_seconds":{"type":"integer","example":1200},"route":{"type":"array","items":{"type":"string"}}},"type":"object"}},"type":"object"}}}},"400":{"description":"Swap quote failed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"ERR_CROSSCHAIN_004"},"message":{"type":"string","example":"Cross-chain swap quote failed"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/crosschain\/swap\/execute":{"post":{"tags":["CrossChain"],"summary":"Execute a cross-chain swap","description":"Executes a cross-chain token swap by first obtaining the best quote and then executing the bridge + swap operations for the given wallet address.","operationId":"crosschainSwapExecute","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["from_chain","to_chain","from_token","to_token","amount","wallet_address"],"properties":{"from_chain":{"type":"string","example":"ethereum","enum":["ethereum","polygon","bsc","bitcoin","solana","tron","arbitrum","optimism","base"]},"to_chain":{"type":"string","example":"polygon","enum":["ethereum","polygon","bsc","bitcoin","solana","tron","arbitrum","optimism","base"]},"from_token":{"type":"string","example":"ETH","maxLength":20},"to_token":{"type":"string","example":"USDC","maxLength":20},"amount":{"description":"Numeric amount as string","type":"string","example":"1.5"},"wallet_address":{"type":"string","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","maxLength":100}},"type":"object"}}}},"responses":{"200":{"description":"Cross-chain swap executed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"swap_id":{"type":"string","example":"swap-xyz789"},"status":{"type":"string","example":"pending"},"bridge_tx_id":{"type":"string","example":"bridge-tx-abc123"},"from_chain":{"type":"string","example":"ethereum"},"to_chain":{"type":"string","example":"polygon"},"from_token":{"type":"string","example":"ETH"},"to_token":{"type":"string","example":"USDC"},"input_amount":{"type":"string","example":"1.5"},"expected_output":{"type":"string","example":"2950.00"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Swap execution failed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"ERR_CROSSCHAIN_005"},"message":{"type":"string","example":"Cross-chain swap execution failed"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/custodians":{"get":{"tags":["Custodians"],"summary":"List all available custodians","description":"Returns a list of all registered custodian banks and their current status","operationId":"listCustodians","responses":{"200":{"description":"List of custodians","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"name":{"type":"string","example":"paysera"},"display_name":{"type":"string","example":"Paysera Bank"},"available":{"type":"boolean","example":true},"supported_assets":{"type":"array","items":{"type":"string","example":"EUR"}}},"type":"object"}},"default":{"type":"string","example":"paysera","nullable":true}},"type":"object"}}}}}}},"\/api\/custodians\/{custodian}\/account-info":{"get":{"tags":["Custodians"],"summary":"Get custodian account information","description":"Retrieves detailed account information from the specified custodian","operationId":"getCustodianAccountInfo","parameters":[{"name":"custodian","in":"path","description":"Custodian identifier","required":true,"schema":{"type":"string","example":"paysera"}},{"name":"account_id","in":"query","description":"Custodian account identifier","required":true,"schema":{"type":"string","example":"ACC123456"}}],"responses":{"200":{"description":"Account information retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"account_id":{"type":"string","example":"ACC123456"},"account_name":{"type":"string","example":"EUR Current Account"},"currency":{"type":"string","example":"EUR"},"status":{"type":"string","example":"active"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request or custodian error","content":{"application\/json":{"schema":{"properties":{"error":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}}}}},"\/api\/custodians\/{custodian}\/balance":{"get":{"tags":["Custodians"],"summary":"Get account balance from custodian","description":"Retrieves the current balance for a specific asset in a custodian account","operationId":"getCustodianBalance","parameters":[{"name":"custodian","in":"path","description":"Custodian identifier","required":true,"schema":{"type":"string","example":"paysera"}},{"name":"account_id","in":"query","description":"Custodian account identifier","required":true,"schema":{"type":"string","example":"ACC123456"}},{"name":"asset_code","in":"query","description":"Asset code (3 characters)","required":true,"schema":{"type":"string","example":"EUR"}}],"responses":{"200":{"description":"Balance retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"account_id":{"type":"string","example":"ACC123456"},"asset_code":{"type":"string","example":"EUR"},"balance":{"description":"Balance in cents","type":"integer","example":150000},"formatted_balance":{"type":"string","example":"1,500.00"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request or custodian error"}}}},"\/api\/custodians\/{custodian}\/transfer":{"post":{"tags":["Custodians"],"summary":"Transfer funds to\/from custodian","description":"Initiates a transfer between an internal account and a custodian account","operationId":"custodianTransfer","parameters":[{"name":"custodian","in":"path","description":"Custodian identifier","required":true,"schema":{"type":"string","example":"paysera"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["internal_account_uuid","custodian_account_id","asset_code","amount","direction"],"properties":{"internal_account_uuid":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"custodian_account_id":{"type":"string","example":"ACC123456"},"asset_code":{"type":"string","example":"EUR"},"amount":{"type":"number","format":"float","example":100.5},"direction":{"type":"string","example":"deposit","enum":["deposit","withdraw"]},"reference":{"type":"string","example":"Invoice payment","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Transfer initiated successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"status":{"type":"string","example":"completed"},"transaction_id":{"type":"string","example":"tx-123456"},"direction":{"type":"string","example":"deposit"},"amount":{"type":"integer","example":10050},"asset_code":{"type":"string","example":"EUR"}},"type":"object"},"message":{"type":"string","example":"Transfer deposit initiated successfully"}},"type":"object"}}}},"400":{"description":"Invalid request or transfer failed"}},"security":[{"bearerAuth":[]}]}},"\/api\/custodians\/{custodian}\/transactions":{"get":{"tags":["Custodians"],"summary":"Get transaction history from custodian","description":"Retrieves transaction history for a custodian account with pagination","operationId":"getCustodianTransactionHistory","parameters":[{"name":"custodian","in":"path","description":"Custodian identifier","required":true,"schema":{"type":"string","example":"paysera"}},{"name":"account_id","in":"query","description":"Custodian account identifier","required":true,"schema":{"type":"string","example":"ACC123456"}},{"name":"limit","in":"query","description":"Number of transactions to return (1-1000)","required":false,"schema":{"type":"integer","default":100,"maximum":1000,"minimum":1}},{"name":"offset","in":"query","description":"Number of transactions to skip","required":false,"schema":{"type":"integer","default":0,"minimum":0}}],"responses":{"200":{"description":"Transaction history retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"string","example":"tx-123456"},"date":{"type":"string","format":"date-time","example":"2024-01-15T10:30:00Z"},"description":{"type":"string","example":"Wire transfer"},"amount":{"type":"integer","example":10000},"balance":{"type":"integer","example":150000},"type":{"type":"string","example":"credit"}},"type":"object"}},"meta":{"properties":{"limit":{"type":"integer","example":100},"offset":{"type":"integer","example":0},"count":{"type":"integer","example":25}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request or custodian error"}}}},"\/api\/custodians\/{custodian}\/transactions\/{transactionId}":{"get":{"tags":["Custodians"],"summary":"Get transaction status","description":"Retrieves the current status of a specific transaction from the custodian","operationId":"getCustodianTransactionStatus","parameters":[{"name":"custodian","in":"path","description":"Custodian identifier","required":true,"schema":{"type":"string","example":"paysera"}},{"name":"transactionId","in":"path","description":"Transaction identifier","required":true,"schema":{"type":"string","example":"tx-123456"}}],"responses":{"200":{"description":"Transaction status retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"transaction_id":{"type":"string","example":"tx-123456"},"status":{"type":"string","example":"completed"},"amount":{"type":"integer","example":10000},"currency":{"type":"string","example":"EUR"},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request or transaction not found"}}}},"\/api\/webhooks\/custodian\/paysera":{"post":{"tags":["Custodian Webhooks"],"summary":"Receive Paysera webhook","description":"Endpoint for receiving webhook notifications from Paysera bank","operationId":"payseraWebhook","requestBody":{"description":"Webhook payload from Paysera","required":true,"content":{"application\/json":{"schema":{"properties":{"event":{"type":"string","example":"transaction.completed"},"event_id":{"type":"string","example":"evt_123456"},"data":{"description":"Event-specific data","type":"object"}},"type":"object"}}}},"responses":{"202":{"description":"Webhook accepted for processing","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"accepted"},"duplicate":{"type":"boolean","example":false}},"type":"object"}}}},"401":{"description":"Invalid signature","content":{"application\/json":{"schema":{"properties":{"error":{"type":"string","example":"Invalid signature"}},"type":"object"}}}},"400":{"description":"Invalid payload"},"500":{"description":"Internal server error"}}}},"\/api\/webhooks\/custodian\/santander":{"post":{"tags":["Custodian Webhooks"],"summary":"Receive Santander webhook","description":"Endpoint for receiving webhook notifications from Santander bank","operationId":"santanderWebhook","requestBody":{"description":"Webhook payload from Santander","required":true,"content":{"application\/json":{"schema":{"properties":{"event_type":{"type":"string","example":"payment.received"},"id":{"type":"string","example":"wh_987654"},"payload":{"description":"Event-specific payload","type":"object"}},"type":"object"}}}},"responses":{"202":{"description":"Webhook accepted for processing","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"accepted"}},"type":"object"}}}},"401":{"description":"Invalid signature"},"400":{"description":"Invalid payload"}}}},"\/api\/webhooks\/custodian\/mock":{"post":{"tags":["Custodian Webhooks"],"summary":"Receive Mock Bank webhook","description":"Endpoint for receiving webhook notifications from Mock Bank (for testing)","operationId":"mockBankWebhook","requestBody":{"description":"Webhook payload from Mock Bank","required":true,"content":{"application\/json":{"schema":{"properties":{"type":{"type":"string","example":"balance.updated"},"id":{"type":"string","example":"mock_123"},"data":{"properties":{"account_id":{"type":"string","example":"ACC123"},"balance":{"type":"integer","example":150000},"currency":{"type":"string","example":"EUR"}},"type":"object"}},"type":"object"}}}},"responses":{"202":{"description":"Webhook accepted for processing"},"401":{"description":"Invalid signature"},"400":{"description":"Invalid payload"}}}},"\/api\/reconciliation\/trigger":{"post":{"tags":["Daily Reconciliation"],"summary":"Trigger manual reconciliation process","description":"Manually triggers the daily bank account reconciliation process (Admin only)","operationId":"triggerReconciliation","responses":{"200":{"description":"Reconciliation completed successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"reconciliation_triggered":{"type":"boolean","example":true},"triggered_at":{"type":"string","format":"date-time","example":"2024-01-15T10:30:00Z"},"report":{"description":"Reconciliation report details","type":"object"}},"type":"object"},"message":{"type":"string","example":"Daily reconciliation completed successfully"}},"type":"object"}}}},"500":{"description":"Reconciliation failed","content":{"application\/json":{"schema":{"properties":{"error":{"type":"string","example":"Reconciliation failed"},"message":{"type":"string","example":"Connection to custodian failed"},"triggered_at":{"type":"string","format":"date-time"}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Forbidden - Admin access required"}},"security":[{"sanctum":[]}]}},"\/api\/reconciliation\/latest":{"get":{"tags":["Daily Reconciliation"],"summary":"Get the latest reconciliation report","description":"Retrieves the most recent reconciliation report (Admin only)","operationId":"getLatestReconciliationReport","responses":{"200":{"description":"Latest report retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"report":{"description":"Full reconciliation report details","type":"object"},"retrieved_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"404":{"description":"No reconciliation reports found","content":{"application\/json":{"schema":{"properties":{"data":{"type":"null"},"message":{"type":"string","example":"No reconciliation reports found"}},"type":"object"}}}},"500":{"description":"Failed to retrieve report","content":{"application\/json":{"schema":{"properties":{"error":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Forbidden - Admin access required"}},"security":[{"sanctum":[]}]}},"\/api\/reconciliation\/history":{"get":{"tags":["Daily Reconciliation"],"summary":"Get reconciliation history","description":"Retrieves historical reconciliation reports with filtering options (Admin only)","operationId":"getReconciliationHistory","parameters":[{"name":"days","in":"query","description":"Number of days to look back (1-90, default: 30)","required":false,"schema":{"type":"integer","default":30,"maximum":90,"minimum":1}},{"name":"limit","in":"query","description":"Maximum number of reports to return (1-50, default: 20)","required":false,"schema":{"type":"integer","default":20,"maximum":50,"minimum":1}}],"responses":{"200":{"description":"History retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"reports":{"type":"array","items":{"properties":{"date":{"type":"string","format":"date","example":"2024-01-15"},"summary":{"type":"object"},"discrepancy_count":{"type":"integer","example":2},"recommendations_count":{"type":"integer","example":3},"file_path":{"type":"string","example":"reconciliation-2024-01-15.json"},"file_size":{"type":"integer","example":15248},"generated_at":{"type":"string","format":"date-time"}},"type":"object"}},"total":{"type":"integer","example":15},"period_days":{"type":"integer","example":30},"retrieved_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"500":{"description":"Failed to retrieve history"},"401":{"description":"Unauthenticated"},"403":{"description":"Forbidden - Admin access required"}},"security":[{"sanctum":[]}]}},"\/api\/reconciliation\/report\/{date}":{"get":{"tags":["Daily Reconciliation"],"summary":"Get reconciliation report for specific date","description":"Retrieves the reconciliation report for a specific date (Admin only)","operationId":"getReconciliationReportByDate","parameters":[{"name":"date","in":"path","description":"Date in YYYY-MM-DD format","required":true,"schema":{"type":"string","format":"date","example":"2024-01-15"}}],"responses":{"200":{"description":"Report retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"date":{"type":"string","format":"date"},"report":{"description":"Full reconciliation report","type":"object"},"file_info":{"properties":{"size":{"type":"integer"},"modified_at":{"type":"string","format":"date-time"}},"type":"object"},"retrieved_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid date format","content":{"application\/json":{"schema":{"properties":{"error":{"type":"string","example":"Invalid date format. Use YYYY-MM-DD format."}},"type":"object"}}}},"404":{"description":"Report not found","content":{"application\/json":{"schema":{"properties":{"error":{"type":"string"},"date":{"type":"string"}},"type":"object"}}}},"500":{"description":"Failed to retrieve report"},"401":{"description":"Unauthenticated"},"403":{"description":"Forbidden - Admin access required"}},"security":[{"sanctum":[]}]}},"\/api\/reconciliation\/metrics":{"get":{"tags":["Daily Reconciliation"],"summary":"Get reconciliation metrics and analytics","description":"Retrieves summary metrics and analytics for reconciliation processes (Admin only)","operationId":"getReconciliationMetrics","parameters":[{"name":"days","in":"query","description":"Number of days to analyze (1-90, default: 30)","required":false,"schema":{"type":"integer","default":30,"maximum":90,"minimum":1}}],"responses":{"200":{"description":"Metrics retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"metrics":{"properties":{"total_reconciliations":{"type":"integer"},"successful_reconciliations":{"type":"integer"},"failed_reconciliations":{"type":"integer"},"total_discrepancies":{"type":"integer"},"total_discrepancy_amount":{"type":"number"},"average_duration_minutes":{"type":"number"},"accounts_checked_total":{"type":"integer"},"average_discrepancies_per_run":{"type":"number"},"success_rate":{"type":"number"},"discrepancy_types":{"type":"object","additionalProperties":{"type":"integer"}},"daily_trends":{"type":"array","items":{"properties":{"date":{"type":"string","format":"date"},"discrepancies":{"type":"integer"},"accounts_checked":{"type":"integer"},"duration_minutes":{"type":"number"},"status":{"type":"string"}},"type":"object"}}},"type":"object"},"period_days":{"type":"integer"},"period_start":{"type":"string","format":"date"},"period_end":{"type":"string","format":"date"},"calculated_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"500":{"description":"Failed to calculate metrics"},"401":{"description":"Unauthenticated"},"403":{"description":"Forbidden - Admin access required"}},"security":[{"sanctum":[]}]}},"\/api\/reconciliation\/status":{"get":{"tags":["Daily Reconciliation"],"summary":"Get current reconciliation process status","description":"Checks if reconciliation process is currently running and provides status information (Admin only)","operationId":"getReconciliationStatus","responses":{"200":{"description":"Status retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"is_running":{"type":"boolean","example":false},"last_run_date":{"type":"string","format":"date","nullable":true},"next_scheduled_run":{"type":"string","format":"date-time"},"status_checked_at":{"type":"string","format":"date-time"},"started_at":{"type":"string","format":"date-time","nullable":true},"running_duration_minutes":{"type":"number","nullable":true},"last_run_summary":{"properties":{"status":{"type":"string"},"accounts_checked":{"type":"integer"},"discrepancies_found":{"type":"integer"},"duration_minutes":{"type":"number"}},"type":"object","nullable":true}},"type":"object"}},"type":"object"}}}},"500":{"description":"Failed to get status"},"401":{"description":"Unauthenticated"},"403":{"description":"Forbidden - Admin access required"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/defi\/protocols":{"get":{"tags":["DeFi"],"summary":"List supported DeFi protocols","description":"Returns all supported DeFi protocols with display names and categories.","operationId":"defiProtocols","responses":{"200":{"description":"List of supported DeFi protocols","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"name":{"type":"string","example":"uniswap_v3"},"display":{"type":"string","example":"Uniswap V3"},"category":{"type":"string","example":"dex"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/defi\/swap\/quote":{"post":{"tags":["DeFi"],"summary":"Get multi-DEX swap quote","description":"Finds the best swap route across multiple DEX protocols for the given token pair on the specified chain.","operationId":"defiSwapQuote","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["chain","from_token","to_token","amount"],"properties":{"chain":{"type":"string","example":"ethereum","enum":["ethereum","polygon","bsc","bitcoin","solana","tron","arbitrum","optimism","base"]},"from_token":{"type":"string","example":"USDC","maxLength":20},"to_token":{"type":"string","example":"ETH","maxLength":20},"amount":{"description":"Decimal amount as string","type":"string","example":"1000.50"},"slippage":{"description":"Slippage tolerance percentage (default 0.5)","type":"number","format":"float","example":0.5,"nullable":true,"maximum":5,"minimum":0.01}},"type":"object"}}}},"responses":{"200":{"description":"Swap quote returned","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"protocol":{"type":"string","example":"uniswap_v3"},"chain":{"type":"string","example":"ethereum"},"from_token":{"type":"string","example":"USDC"},"to_token":{"type":"string","example":"ETH"},"amount_in":{"type":"string","example":"1000.50"},"amount_out":{"type":"string","example":"0.425"},"price_impact":{"type":"string","example":"0.12"},"fee":{"type":"string","example":"3.00"},"route":{"type":"array","items":{"type":"string"}}},"type":"object"}},"type":"object"}}}},"400":{"description":"Quote failed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"ERR_DEFI_001"},"message":{"type":"string","example":"No route found for token pair"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/defi\/swap\/execute":{"post":{"tags":["DeFi"],"summary":"Execute swap via best route","description":"Finds the best route and executes the token swap on-chain via the optimal DEX protocol.","operationId":"defiSwapExecute","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["chain","from_token","to_token","amount","wallet_address"],"properties":{"chain":{"type":"string","example":"ethereum","enum":["ethereum","polygon","bsc","bitcoin","solana","tron","arbitrum","optimism","base"]},"from_token":{"type":"string","example":"USDC","maxLength":20},"to_token":{"type":"string","example":"ETH","maxLength":20},"amount":{"description":"Decimal amount as string","type":"string","example":"1000.50"},"wallet_address":{"type":"string","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","maxLength":100},"slippage":{"description":"Slippage tolerance percentage (default 0.5)","type":"number","format":"float","example":0.5,"nullable":true,"maximum":5,"minimum":0.01}},"type":"object"}}}},"responses":{"200":{"description":"Swap executed successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"tx_hash":{"type":"string","example":"0xabc123..."},"protocol":{"type":"string","example":"uniswap_v3"},"chain":{"type":"string","example":"ethereum"},"from_token":{"type":"string","example":"USDC"},"to_token":{"type":"string","example":"ETH"},"amount_in":{"type":"string","example":"1000.50"},"amount_out":{"type":"string","example":"0.425"},"status":{"type":"string","example":"confirmed"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Swap execution failed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"ERR_DEFI_002"},"message":{"type":"string","example":"Swap execution failed"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/defi\/lending\/markets":{"get":{"tags":["DeFi"],"summary":"Get lending markets","description":"Returns available lending markets for the specified chain, including supply\/borrow rates and available liquidity.","operationId":"defiLendingMarkets","parameters":[{"name":"chain","in":"query","description":"Blockchain network (defaults to ethereum)","required":false,"schema":{"type":"string","default":"ethereum","enum":["ethereum","polygon","bsc","bitcoin","solana","tron","arbitrum","optimism","base"]}}],"responses":{"200":{"description":"Lending markets returned","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"asset":{"type":"string","example":"USDC"},"supply_apy":{"type":"number","format":"float","example":3.45},"borrow_apy":{"type":"number","format":"float","example":5.12},"total_supply":{"type":"string","example":"1250000000.00"},"total_borrow":{"type":"string","example":"890000000.00"},"utilization":{"type":"number","format":"float","example":71.2},"protocol":{"type":"string","example":"aave_v3"}},"type":"object"}}},"type":"object"}}}},"400":{"description":"Failed to fetch lending markets","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"ERR_DEFI_003"},"message":{"type":"string","example":"Failed to fetch lending markets"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Invalid chain value","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"ERR_DEFI_003"},"message":{"type":"string","example":"Invalid chain value."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/defi\/portfolio":{"get":{"tags":["DeFi"],"summary":"Get DeFi portfolio across chains","description":"Returns an aggregated DeFi portfolio summary for the given wallet address spanning all supported chains and protocols.","operationId":"defiPortfolio","parameters":[{"name":"wallet_address","in":"query","description":"Wallet address to retrieve portfolio for","required":true,"schema":{"type":"string","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","maxLength":100}}],"responses":{"200":{"description":"Portfolio summary returned","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"total_value_usd":{"type":"string","example":"125430.50"},"positions":{"type":"array","items":{"properties":{"protocol":{"type":"string","example":"aave_v3"},"chain":{"type":"string","example":"ethereum"},"type":{"type":"string","example":"lending"},"value_usd":{"type":"string","example":"50000.00"}},"type":"object"}},"chains":{"type":"array","items":{"properties":{"chain":{"type":"string","example":"ethereum"},"value_usd":{"type":"string","example":"100000.00"}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/defi\/positions":{"get":{"tags":["DeFi"],"summary":"Get active DeFi positions","description":"Returns all active DeFi positions for a wallet address with optional chain and protocol filters.","operationId":"defiPositions","parameters":[{"name":"wallet_address","in":"query","description":"Wallet address to retrieve positions for","required":true,"schema":{"type":"string","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","maxLength":100}},{"name":"chain","in":"query","description":"Filter by blockchain network","required":false,"schema":{"type":"string","enum":["ethereum","polygon","bsc","bitcoin","solana","tron","arbitrum","optimism","base"]}},{"name":"protocol","in":"query","description":"Filter by DeFi protocol","required":false,"schema":{"type":"string","enum":["uniswap_v3","aave_v3","curve","lido","demo"]}}],"responses":{"200":{"description":"Active positions returned","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"id":{"type":"string","example":"pos_abc123"},"protocol":{"type":"string","example":"aave_v3"},"chain":{"type":"string","example":"ethereum"},"type":{"type":"string","example":"lending"},"asset":{"type":"string","example":"USDC"},"amount":{"type":"string","example":"10000.00"},"value_usd":{"type":"string","example":"10000.00"},"apy":{"type":"number","format":"float","example":3.45},"status":{"type":"string","example":"active"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/defi\/staking\/stake":{"post":{"tags":["DeFi"],"summary":"Get staking info and positions","description":"Returns staking APY and the user's staked balance for the specified chain via the Lido liquid staking protocol.","operationId":"defiStaking","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["chain","wallet_address"],"properties":{"chain":{"type":"string","example":"ethereum","enum":["ethereum","polygon","bsc","bitcoin","solana","tron","arbitrum","optimism","base"]},"wallet_address":{"type":"string","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","maxLength":100}},"type":"object"}}}},"responses":{"200":{"description":"Staking info returned","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"protocol":{"type":"string","example":"lido"},"staking_apy":{"type":"number","format":"float","example":4.85},"staked_balance":{"type":"string","example":"32.50"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Staking info retrieval failed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"ERR_DEFI_004"},"message":{"type":"string","example":"Failed to retrieve staking info"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/defi\/yield\/best":{"get":{"tags":["DeFi"],"summary":"Get best yield opportunities","description":"Returns the best yield opportunities across all supported chains and DeFi protocols for the given wallet address.","operationId":"defiYieldBest","parameters":[{"name":"wallet_address","in":"query","description":"Wallet address to find yield opportunities for","required":true,"schema":{"type":"string","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","maxLength":100}}],"responses":{"200":{"description":"Yield opportunities returned","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"protocol":{"type":"string","example":"aave_v3"},"chain":{"type":"string","example":"ethereum"},"asset":{"type":"string","example":"USDC"},"type":{"type":"string","example":"lending"},"apy":{"type":"number","format":"float","example":5.25},"tvl":{"type":"string","example":"1250000000.00"},"risk_level":{"type":"string","example":"low"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/demo\/ai-chat":{"post":{"tags":["Demo AI Chat"],"summary":"Send a message to the demo AI agent","description":"Public endpoint for demo AI chat. No authentication required. Rate limited to 60 requests\/minute.","operationId":"demoAiChat","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["message"],"properties":{"message":{"type":"string","example":"What is my account balance?","maxLength":500}},"type":"object"}}}},"responses":{"200":{"description":"AI agent response","content":{"application\/json":{"schema":{"properties":{"message_id":{"type":"string"},"content":{"type":"string"},"confidence":{"type":"number"},"tools_used":{"type":"array","items":{"type":"string"}},"agents_used":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error"},"429":{"description":"Rate limit exceeded"}}}},"\/api\/compliance\/regulatory-reports":{"get":{"tags":["Compliance"],"summary":"List regulatory reports with enhanced filtering","description":"Returns a paginated list of regulatory reports with support for filtering by type, jurisdiction, status, date range, overdue flag, and priority.","operationId":"regulatoryIndex","parameters":[{"name":"report_type","in":"query","description":"Filter by report type","required":false,"schema":{"type":"string"}},{"name":"jurisdiction","in":"query","description":"Filter by jurisdiction","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by report status","required":false,"schema":{"type":"string"}},{"name":"date_from","in":"query","description":"Start of reporting period","required":false,"schema":{"type":"string","format":"date"}},{"name":"date_to","in":"query","description":"End of reporting period","required":false,"schema":{"type":"string","format":"date"}},{"name":"overdue_only","in":"query","description":"Show only overdue reports","required":false,"schema":{"type":"boolean"}},{"name":"priority","in":"query","description":"Minimum priority level","required":false,"schema":{"type":"integer","maximum":5,"minimum":1}},{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer","minimum":1}},{"name":"per_page","in":"query","description":"Results per page","required":false,"schema":{"type":"integer","maximum":100,"minimum":10}}],"responses":{"200":{"description":"Paginated list of regulatory reports","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"current_page":{"type":"integer","example":1},"last_page":{"type":"integer","example":5},"per_page":{"type":"integer","example":20},"total":{"type":"integer","example":100}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/regulatory-reports\/{reportId}":{"get":{"tags":["Compliance"],"summary":"Show regulatory report details","description":"Returns detailed information for a specific regulatory report, including time until due, submission eligibility, and full filing history.","operationId":"regulatoryShow","parameters":[{"name":"reportId","in":"path","description":"Regulatory report ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Report details","content":{"application\/json":{"schema":{"properties":{"report":{"type":"object"},"time_until_due":{"type":"string","example":"3 days","nullable":true},"can_be_submitted":{"type":"boolean","example":true},"filing_history":{"type":"array","items":{"properties":{"filing_id":{"type":"string"},"status":{"type":"string"},"filed_at":{"type":"string","format":"date-time"},"processing_time":{"type":"string","nullable":true}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Report not found"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/regulatory-reports\/generate\/ctr":{"post":{"tags":["Compliance"],"summary":"Generate enhanced Currency Transaction Report","description":"Generates an enhanced CTR (Currency Transaction Report) for the specified date, including fraud analysis indicators.","operationId":"regulatoryGenerateEnhancedCTR","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["date"],"properties":{"date":{"description":"Report date (must be today or earlier)","type":"string","format":"date","example":"2025-01-15"}},"type":"object"}}}},"responses":{"200":{"description":"CTR generated successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Enhanced CTR generated successfully"},"report":{"type":"object"},"fraud_analysis_included":{"type":"boolean","example":true}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Validation error"},"500":{"description":"Report generation failed"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/regulatory-reports\/generate\/sar":{"post":{"tags":["Compliance"],"summary":"Generate enhanced Suspicious Activity Report","description":"Generates an enhanced SAR (Suspicious Activity Report) for the specified date range. Flags reports that require immediate filing.","operationId":"regulatoryGenerateEnhancedSAR","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["start_date","end_date"],"properties":{"start_date":{"description":"Start date (must be today or earlier)","type":"string","format":"date","example":"2025-01-01"},"end_date":{"description":"End date (must be on or after start_date and today or earlier)","type":"string","format":"date","example":"2025-01-31"}},"type":"object"}}}},"responses":{"200":{"description":"SAR generated successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Enhanced SAR generated successfully"},"report":{"type":"object"},"requires_immediate_filing":{"type":"boolean","example":false}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Validation error"},"500":{"description":"Report generation failed"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/regulatory-reports\/generate\/aml":{"post":{"tags":["Compliance"],"summary":"Generate AML compliance report","description":"Generates an Anti-Money Laundering (AML) compliance report for the specified month.","operationId":"regulatoryGenerateAMLReport","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["month"],"properties":{"month":{"description":"Report month in Y-m format (must be current month or earlier)","type":"string","example":"2025-01"}},"type":"object"}}}},"responses":{"200":{"description":"AML report generated successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"AML report generated successfully"},"report":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Validation error"},"500":{"description":"Report generation failed"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/regulatory-reports\/generate\/ofac":{"post":{"tags":["Compliance"],"summary":"Generate OFAC sanctions screening report","description":"Generates an OFAC (Office of Foreign Assets Control) sanctions screening report for the specified date. Flags reports that require immediate action.","operationId":"regulatoryGenerateOFACReport","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["date"],"properties":{"date":{"description":"Report date (must be today or earlier)","type":"string","format":"date","example":"2025-01-15"}},"type":"object"}}}},"responses":{"200":{"description":"OFAC report generated successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"OFAC report generated successfully"},"report":{"type":"object"},"requires_immediate_action":{"type":"boolean","example":false}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Validation error"},"500":{"description":"Report generation failed"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/regulatory-reports\/generate\/bsa":{"post":{"tags":["Compliance"],"summary":"Generate BSA compliance report","description":"Generates a Bank Secrecy Act (BSA) compliance report for the specified quarter and year.","operationId":"regulatoryGenerateBSAReport","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["quarter","year"],"properties":{"quarter":{"description":"Fiscal quarter (1-4)","type":"integer","example":1,"maximum":4,"minimum":1},"year":{"description":"Report year","type":"integer","example":2025,"minimum":2020}},"type":"object"}}}},"responses":{"200":{"description":"BSA report generated successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"BSA report generated successfully"},"report":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Validation error"},"500":{"description":"Report generation failed"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/regulatory-reports\/{reportId}\/submit":{"post":{"tags":["Compliance"],"summary":"Submit a regulatory report to the authority","description":"Submits a regulatory report for filing with the appropriate regulatory authority. Supports initial, amendment, and correction filing types via API, portal, or email.","operationId":"regulatorySubmitReport","parameters":[{"name":"reportId","in":"path","description":"Regulatory report ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"properties":{"filing_type":{"description":"Type of filing","type":"string","example":"initial","enum":["initial","amendment","correction"]},"filing_method":{"description":"Filing submission method","type":"string","example":"api","enum":["api","portal","email"]}},"type":"object"}}}},"responses":{"200":{"description":"Report submitted successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Report submitted successfully"},"filing":{"type":"object"},"reference":{"type":"string","example":"FIL-2025-00123"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Report not found"},"422":{"description":"Validation error"},"500":{"description":"Submission failed"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/regulatory-reports\/filings\/{filingId}\/status":{"get":{"tags":["Compliance"],"summary":"Check the status of a regulatory filing","description":"Queries the current status of a previously submitted regulatory filing, returning the latest filing record and any status updates.","operationId":"regulatoryCheckFilingStatus","parameters":[{"name":"filingId","in":"path","description":"Filing record ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Filing status retrieved","content":{"application\/json":{"schema":{"properties":{"filing":{"type":"object"},"status_check":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Filing not found"},"500":{"description":"Status check failed"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/regulatory-reports\/filings\/{filingId}\/retry":{"post":{"tags":["Compliance"],"summary":"Retry a failed regulatory filing","description":"Retries submission of a previously failed regulatory filing.","operationId":"regulatoryRetryFiling","parameters":[{"name":"filingId","in":"path","description":"Filing record ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Filing retry initiated","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Filing retry initiated"},"filing":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Filing not found"},"500":{"description":"Retry failed"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/regulatory-reports\/thresholds":{"get":{"tags":["Compliance"],"summary":"Get regulatory thresholds","description":"Returns a paginated list of regulatory thresholds, with optional filtering by category, report type, jurisdiction, and active status.","operationId":"regulatoryGetThresholds","parameters":[{"name":"category","in":"query","description":"Filter by threshold category","required":false,"schema":{"type":"string"}},{"name":"report_type","in":"query","description":"Filter by report type","required":false,"schema":{"type":"string"}},{"name":"jurisdiction","in":"query","description":"Filter by jurisdiction","required":false,"schema":{"type":"string"}},{"name":"active_only","in":"query","description":"Show only active thresholds (default true)","required":false,"schema":{"type":"boolean"}},{"name":"per_page","in":"query","description":"Results per page","required":false,"schema":{"type":"integer","maximum":100,"minimum":10}}],"responses":{"200":{"description":"Paginated list of regulatory thresholds","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"current_page":{"type":"integer","example":1},"last_page":{"type":"integer","example":3},"per_page":{"type":"integer","example":20},"total":{"type":"integer","example":50}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/regulatory-reports\/thresholds\/{thresholdId}":{"put":{"tags":["Compliance"],"summary":"Update a regulatory threshold","description":"Updates configuration for a specific regulatory threshold, including amount, count, active status, and review priority.","operationId":"regulatoryUpdateThreshold","parameters":[{"name":"thresholdId","in":"path","description":"Threshold ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"amount_threshold":{"description":"Amount threshold","type":"number","format":"float","example":10000},"count_threshold":{"description":"Transaction count threshold","type":"integer","example":5,"minimum":0},"is_active":{"description":"Whether the threshold is active","type":"boolean","example":true},"review_priority":{"description":"Review priority level","type":"integer","example":3,"maximum":5,"minimum":1}},"type":"object"}}}},"responses":{"200":{"description":"Threshold updated successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Threshold updated successfully"},"threshold":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Threshold not found"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/regulatory-reports\/dashboard":{"get":{"tags":["Compliance"],"summary":"Get the regulatory compliance dashboard","description":"Returns an aggregated dashboard view of regulatory reports, including totals, pending\/overdue counts, breakdowns by type and jurisdiction, upcoming deadlines, recent filings, and top threshold triggers.","operationId":"regulatoryDashboard","parameters":[{"name":"period","in":"query","description":"Dashboard time period (default: month)","required":false,"schema":{"type":"string","enum":["week","month","quarter","year"]}}],"responses":{"200":{"description":"Dashboard data","content":{"application\/json":{"schema":{"properties":{"dashboard":{"properties":{"reports":{"properties":{"total":{"type":"integer","example":42},"pending":{"type":"integer","example":5},"overdue":{"type":"integer","example":2},"submitted":{"type":"integer","example":35}},"type":"object"},"by_type":{"type":"object"},"by_jurisdiction":{"type":"object"},"upcoming_due":{"type":"array","items":{"type":"object"}},"recent_filings":{"type":"array","items":{"properties":{"filing_id":{"type":"string"},"report_type":{"type":"string"},"status":{"type":"string"},"filed_at":{"type":"string","format":"date-time"}},"type":"object"}},"threshold_triggers":{"type":"array","items":{"properties":{"code":{"type":"string"},"name":{"type":"string"},"trigger_count":{"type":"integer"},"last_triggered":{"type":"string","format":"date-time","nullable":true}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/regulatory-reports\/{reportId}\/download":{"get":{"tags":["Compliance"],"summary":"Download a regulatory report file","description":"Downloads the generated file for a specific regulatory report. Returns a 404 if the file has not been generated or is no longer available.","operationId":"regulatoryDownload","parameters":[{"name":"reportId","in":"path","description":"Regulatory report ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File download","content":{"application\/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Report or file not found"}},"security":[{"sanctum":[]}]}},"\/api\/exchange\/orders":{"get":{"tags":["Exchange"],"summary":"Get user's orders","operationId":"5c46c399a7b468f216ac7817493acaab","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["open","filled","cancelled","all"]}},{"name":"base_currency","in":"query","schema":{"type":"string"}},{"name":"quote_currency","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"List of orders"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Exchange"],"summary":"Place a new order","operationId":"12d11d4f8e4b46d17125e5f34fe57b66","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["type","order_type","base_currency","quote_currency","amount"],"properties":{"type":{"type":"string","enum":["buy","sell"]},"order_type":{"type":"string","enum":["market","limit"]},"base_currency":{"type":"string","example":"BTC"},"quote_currency":{"type":"string","example":"EUR"},"amount":{"type":"string","example":"0.01"},"price":{"description":"Required for limit orders","type":"string","example":"50000"},"stop_price":{"description":"For stop orders","type":"string","example":"49000"}},"type":"object"}}}},"responses":{"200":{"description":"Order placed successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"order_id":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/exchange\/orders\/{orderId}":{"delete":{"tags":["Exchange"],"summary":"Cancel an order","operationId":"fd98e5dbccffc90f7421f618c8d6b49c","parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Order cancelled successfully"}},"security":[{"bearerAuth":[]}]}},"\/api\/exchange\/trades":{"get":{"tags":["Exchange"],"summary":"Get user's trade history","operationId":"2bf1f6a21e38ef48b3272f925f6c4dee","parameters":[{"name":"base_currency","in":"query","schema":{"type":"string"}},{"name":"quote_currency","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"List of trades"}},"security":[{"bearerAuth":[]}]}},"\/api\/exchange\/orderbook\/{baseCurrency}\/{quoteCurrency}":{"get":{"tags":["Exchange"],"summary":"Get order book for a trading pair","operationId":"6d27fc2973fdd320cacce11135c67262","parameters":[{"name":"baseCurrency","in":"path","required":true,"schema":{"type":"string"}},{"name":"quoteCurrency","in":"path","required":true,"schema":{"type":"string"}},{"name":"depth","in":"query","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"Order book data"}}}},"\/api\/exchange\/markets":{"get":{"tags":["Exchange"],"summary":"Get market data for all trading pairs","operationId":"5e52bf63518a4ea5d3941b37ceecbc46","responses":{"200":{"description":"Market data for all pairs"}}}},"\/api\/exchange-rates\/{from}\/{to}":{"get":{"tags":["Exchange Rates"],"summary":"Get current exchange rate","description":"Retrieve the current exchange rate between two assets","operationId":"getExchangeRate","parameters":[{"name":"from","in":"path","description":"The source asset code","required":true,"schema":{"type":"string","example":"USD"}},{"name":"to","in":"path","description":"The target asset code","required":true,"schema":{"type":"string","example":"EUR"}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"from_asset":{"type":"string"},"to_asset":{"type":"string"},"rate":{"type":"string"},"inverse_rate":{"type":"string"},"source":{"type":"string"},"valid_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"is_active":{"type":"boolean"},"age_minutes":{"type":"integer"},"metadata":{"type":"object"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Exchange rate not found","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string"},"error":{"type":"string"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/exchange-rates\/{from}\/{to}\/convert":{"get":{"tags":["Exchange Rates"],"summary":"Convert amount between assets","description":"Convert an amount from one asset to another using current exchange rates","operationId":"convertCurrency","parameters":[{"name":"from","in":"path","description":"The source asset code","required":true,"schema":{"type":"string","example":"USD"}},{"name":"to","in":"path","description":"The target asset code","required":true,"schema":{"type":"string","example":"EUR"}},{"name":"amount","in":"query","description":"The amount to convert (in smallest unit)","required":true,"schema":{"type":"integer","example":10000}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"from_asset":{"type":"string"},"to_asset":{"type":"string"},"from_amount":{"type":"integer"},"to_amount":{"type":"integer"},"from_formatted":{"type":"string"},"to_formatted":{"type":"string"},"rate":{"type":"string"},"rate_age_minutes":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ValidationError"}}}},"404":{"description":"Conversion not available"}},"security":[{"sanctum":[]}]}},"\/api\/exchange-rates":{"get":{"tags":["Exchange Rates"],"summary":"List exchange rates","description":"Get a list of available exchange rates with filtering options","operationId":"listExchangeRates","parameters":[{"name":"from","in":"query","description":"Filter by source asset code","required":false,"schema":{"type":"string","example":"USD"}},{"name":"to","in":"query","description":"Filter by target asset code","required":false,"schema":{"type":"string","example":"EUR"}},{"name":"source","in":"query","description":"Filter by rate source","required":false,"schema":{"type":"string","enum":["manual","api","oracle","market"]}},{"name":"active","in":"query","description":"Filter by active status","required":false,"schema":{"type":"boolean"}},{"name":"valid","in":"query","description":"Filter by validity (not expired)","required":false,"schema":{"type":"boolean"}},{"name":"limit","in":"query","description":"Number of results per page (max 100)","required":false,"schema":{"type":"integer","maximum":100,"minimum":1}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"integer"},"from_asset":{"type":"string"},"to_asset":{"type":"string"},"rate":{"type":"string"},"inverse_rate":{"type":"string"},"source":{"type":"string"},"valid_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"is_active":{"type":"boolean"},"age_minutes":{"type":"integer"}},"type":"object"}},"meta":{"properties":{"total":{"type":"integer"},"valid":{"type":"integer"},"stale":{"type":"integer"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/exchange-rates\/providers":{"get":{"tags":["Exchange Rates"],"summary":"List all available exchange rate providers","description":"Returns a list of all registered exchange rate providers with their capabilities and status","operationId":"listExchangeRateProviders","responses":{"200":{"description":"List of providers retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"name":{"type":"string","example":"ecb"},"display_name":{"type":"string","example":"European Central Bank"},"available":{"type":"boolean","example":true},"priority":{"type":"integer","example":100},"capabilities":{"properties":{"supports_historical":{"type":"boolean"},"supports_realtime":{"type":"boolean"},"supports_crypto":{"type":"boolean"}},"type":"object"},"supported_currencies":{"type":"array","items":{"type":"string","example":"EUR"}}},"type":"object"}},"default":{"type":"string","example":"ecb","nullable":true}},"type":"object"}}}}}}},"\/api\/exchange-rates\/providers\/{provider}\/rate":{"get":{"tags":["Exchange Rates"],"summary":"Get exchange rate from specific provider","description":"Retrieves the current exchange rate for a currency pair from the specified provider","operationId":"getProviderExchangeRate","parameters":[{"name":"provider","in":"path","description":"Provider identifier","required":true,"schema":{"type":"string","example":"ecb"}},{"name":"from","in":"query","description":"Source currency code (3 characters)","required":true,"schema":{"type":"string","pattern":"^[A-Z]{3}$","example":"EUR"}},{"name":"to","in":"query","description":"Target currency code (3 characters)","required":true,"schema":{"type":"string","pattern":"^[A-Z]{3}$","example":"USD"}}],"responses":{"200":{"description":"Exchange rate retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"from_currency":{"type":"string","example":"EUR"},"to_currency":{"type":"string","example":"USD"},"rate":{"type":"number","format":"float","example":1.0825},"bid":{"type":"number","format":"float","example":1.082},"ask":{"type":"number","format":"float","example":1.083},"provider":{"type":"string","example":"ecb"},"timestamp":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request parameters","content":{"application\/json":{"schema":{"properties":{"error":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}},"503":{"description":"Provider is not available","content":{"application\/json":{"schema":{"properties":{"error":{"type":"string","example":"Provider is not available"}},"type":"object"}}}}}}},"\/api\/exchange-rates\/compare":{"get":{"tags":["Exchange Rates"],"summary":"Compare rates from all providers","description":"Retrieves and compares exchange rates for a currency pair from all available providers","operationId":"compareExchangeRates","parameters":[{"name":"from","in":"query","description":"Source currency code (3 characters)","required":true,"schema":{"type":"string","pattern":"^[A-Z]{3}$","example":"EUR"}},{"name":"to","in":"query","description":"Target currency code (3 characters)","required":true,"schema":{"type":"string","pattern":"^[A-Z]{3}$","example":"USD"}}],"responses":{"200":{"description":"Rate comparison retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"description":"Comparison data with provider rates","type":"object"},"pair":{"type":"string","example":"EUR\/USD"},"timestamp":{"type":"string","format":"date-time"}},"type":"object"}}}},"400":{"description":"Invalid request parameters"}}}},"\/api\/exchange-rates\/aggregated":{"get":{"tags":["Exchange Rates"],"summary":"Get aggregated rate from multiple providers","description":"Calculates an aggregated exchange rate using data from multiple providers","operationId":"getAggregatedExchangeRate","parameters":[{"name":"from","in":"query","description":"Source currency code (3 characters)","required":true,"schema":{"type":"string","pattern":"^[A-Z]{3}$","example":"EUR"}},{"name":"to","in":"query","description":"Target currency code (3 characters)","required":true,"schema":{"type":"string","pattern":"^[A-Z]{3}$","example":"USD"}}],"responses":{"200":{"description":"Aggregated rate retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"from_currency":{"type":"string"},"to_currency":{"type":"string"},"rate":{"type":"number","format":"float"},"bid":{"type":"number","format":"float"},"ask":{"type":"number","format":"float"},"provider":{"type":"string","example":"aggregated"},"timestamp":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request parameters"}}}},"\/api\/exchange-rates\/refresh":{"post":{"tags":["Exchange Rates"],"summary":"Refresh exchange rates","description":"Manually triggers a refresh of exchange rates for specified currency pairs or all active pairs","operationId":"refreshExchangeRates","requestBody":{"required":false,"content":{"application\/json":{"schema":{"properties":{"pairs":{"description":"Optional array of currency pairs to refresh","type":"array","items":{"type":"string","pattern":"^[A-Z]{3}\/[A-Z]{3}$","example":"EUR\/USD"}}},"type":"object"}}}},"responses":{"200":{"description":"Rates refreshed successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Exchange rates refreshed"},"data":{"properties":{"refreshed":{"type":"array","items":{"type":"string","example":"EUR\/USD"}},"failed":{"type":"array","items":{"properties":{"pair":{"type":"string"},"error":{"type":"string"}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request parameters"}}}},"\/api\/exchange-rates\/historical":{"get":{"tags":["Exchange Rates"],"summary":"Get historical exchange rates","description":"Retrieves historical exchange rates for a currency pair within a specified date range","operationId":"getHistoricalExchangeRates","parameters":[{"name":"from","in":"query","description":"Source currency code (3 characters)","required":true,"schema":{"type":"string","pattern":"^[A-Z]{3}$","example":"EUR"}},{"name":"to","in":"query","description":"Target currency code (3 characters)","required":true,"schema":{"type":"string","pattern":"^[A-Z]{3}$","example":"USD"}},{"name":"start_date","in":"query","description":"Start date for historical data","required":true,"schema":{"type":"string","format":"date","example":"2024-01-01"}},{"name":"end_date","in":"query","description":"End date for historical data (must be after or equal to start_date)","required":true,"schema":{"type":"string","format":"date","example":"2024-01-31"}}],"responses":{"200":{"description":"Historical rates retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"description":"Array of historical rate data","type":"array","items":{"type":"object"}},"pair":{"type":"string","example":"EUR\/USD"},"period":{"properties":{"start":{"type":"string","format":"date"},"end":{"type":"string","format":"date"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request parameters"}}}},"\/api\/exchange-rates\/validate":{"post":{"tags":["Exchange Rates"],"summary":"Validate an exchange rate","description":"Validates a given exchange rate against current market rates and configured thresholds","operationId":"validateExchangeRate","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["from","to","rate"],"properties":{"from":{"description":"Source currency code","type":"string","pattern":"^[A-Z]{3}$","example":"EUR"},"to":{"description":"Target currency code","type":"string","pattern":"^[A-Z]{3}$","example":"USD"},"rate":{"description":"Exchange rate to validate","type":"number","format":"float","example":1.0825,"minimum":0},"provider":{"description":"Optional provider name","type":"string","example":"manual"}},"type":"object"}}}},"responses":{"200":{"description":"Validation result","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"is_valid":{"type":"boolean"},"deviation_percentage":{"type":"number"},"market_rate":{"type":"number"},"validation_messages":{"type":"array","items":{"type":"string"}}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request parameters"}}}},"\/api\/exchange-rate-providers":{"get":{"tags":["Exchange Rate Providers"],"summary":"List exchange rate providers","description":"Returns available exchange rate providers with status","operationId":"exchangeRateProvidersIndex","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/exchange-rate-providers\/{provider}\/rate":{"get":{"tags":["Exchange Rate Providers"],"summary":"Get rate from provider","description":"Gets exchange rate from a specific provider","operationId":"exchangeRateProvidersGetRate","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/exchange-rate-providers\/compare":{"get":{"tags":["Exchange Rate Providers"],"summary":"Compare rates across providers","description":"Compares exchange rates across all providers","operationId":"exchangeRateProvidersCompareRates","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/exchange-rate-providers\/aggregated":{"get":{"tags":["Exchange Rate Providers"],"summary":"Get aggregated rate","description":"Returns weighted average rate across providers","operationId":"exchangeRateProvidersGetAggregatedRate","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/exchange-rate-providers\/refresh":{"post":{"tags":["Exchange Rate Providers"],"summary":"Refresh exchange rates","description":"Forces refresh of exchange rates from providers","operationId":"exchangeRateProvidersRefresh","responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/exchange-rate-providers\/historical":{"get":{"tags":["Exchange Rate Providers"],"summary":"Get historical rates","description":"Returns historical exchange rates for a currency pair","operationId":"exchangeRateProvidersHistorical","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/exchange-rate-providers\/validate":{"post":{"tags":["Exchange Rate Providers"],"summary":"Validate an exchange rate","description":"Validates a rate against market data","operationId":"exchangeRateProvidersValidateRate","responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/external-exchange\/connectors":{"get":{"tags":["External Exchange"],"summary":"Get available external exchange connectors","operationId":"353e5dc50ff741b7e4e0baad991d8d48","responses":{"200":{"description":"List of available connectors","content":{"application\/json":{"schema":{"properties":{"connectors":{"type":"array","items":{"properties":{"name":{"type":"string","example":"binance"},"display_name":{"type":"string","example":"Binance"},"available":{"type":"boolean","example":true}},"type":"object"}}},"type":"object"}}}}}}},"\/api\/external-exchange\/ticker\/{base}\/{quote}":{"get":{"tags":["External Exchange"],"summary":"Get aggregated ticker data from external exchanges","operationId":"88647ac7ac6f2813b232e942834919c2","parameters":[{"name":"base","in":"path","required":true,"schema":{"type":"string","example":"BTC"}},{"name":"quote","in":"path","required":true,"schema":{"type":"string","example":"EUR"}}],"responses":{"200":{"description":"Aggregated ticker data"}}}},"\/api\/external-exchange\/orderbook\/{base}\/{quote}":{"get":{"tags":["External Exchange"],"summary":"Get aggregated order book from external exchanges","operationId":"1326d00c8161ed42b95ae1b8b68e0182","parameters":[{"name":"base","in":"path","required":true,"schema":{"type":"string","example":"BTC"}},{"name":"quote","in":"path","required":true,"schema":{"type":"string","example":"EUR"}},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"Aggregated order book"}}}},"\/api\/external-exchange\/arbitrage\/{base}\/{quote}":{"get":{"tags":["External Exchange"],"summary":"Check arbitrage opportunities","operationId":"d2067e49f0c4fee7b8faef8a224e61dd","parameters":[{"name":"base","in":"path","required":true,"schema":{"type":"string","example":"BTC"}},{"name":"quote","in":"path","required":true,"schema":{"type":"string","example":"EUR"}}],"responses":{"200":{"description":"Arbitrage opportunities"}},"security":[{"bearerAuth":[]}]}},"\/api\/external-exchanges\/connectors":{"get":{"tags":["External Exchanges"],"summary":"List exchange connectors","description":"Returns available external exchange connectors","operationId":"externalExchangesConnectors","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/external-exchanges\/ticker\/{base}\/{quote}":{"get":{"tags":["External Exchanges"],"summary":"Get ticker data","description":"Returns current ticker data for a trading pair","operationId":"externalExchangesTicker","parameters":[{"name":"base","in":"path","required":true,"schema":{"type":"string"}},{"name":"quote","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/external-exchanges\/order-book\/{base}\/{quote}":{"get":{"tags":["External Exchanges"],"summary":"Get order book","description":"Returns order book for a trading pair","operationId":"externalExchangesOrderBook","parameters":[{"name":"base","in":"path","required":true,"schema":{"type":"string"}},{"name":"quote","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/external-exchanges\/arbitrage\/{base}\/{quote}":{"get":{"tags":["External Exchanges"],"summary":"Get arbitrage opportunities","description":"Returns arbitrage opportunities for a trading pair","operationId":"externalExchangesArbitrage","parameters":[{"name":"base","in":"path","required":true,"schema":{"type":"string"}},{"name":"quote","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/fraud\/dashboard":{"get":{"tags":["Fraud Detection"],"summary":"Get fraud detection dashboard overview","operationId":"fraudDashboard","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string"},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/fraud\/alerts":{"get":{"tags":["Fraud Detection"],"summary":"List all fraud alerts","operationId":"fraudGetAlerts","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"meta":{"properties":{"total":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/fraud\/alerts\/{id}":{"get":{"tags":["Fraud Detection"],"summary":"Get details of a specific fraud alert","operationId":"fraudGetAlertDetails","parameters":[{"name":"id","in":"path","description":"Alert ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/fraud\/alerts\/{id}\/acknowledge":{"post":{"tags":["Fraud Detection"],"summary":"Acknowledge a fraud alert","operationId":"fraudAcknowledgeAlert","parameters":[{"name":"id","in":"path","description":"Alert ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string"},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/fraud\/alerts\/{id}\/investigate":{"post":{"tags":["Fraud Detection"],"summary":"Start investigation on a fraud alert","operationId":"fraudInvestigateAlert","parameters":[{"name":"id","in":"path","description":"Alert ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string"},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/fraud\/statistics":{"get":{"tags":["Fraud Detection"],"summary":"Get fraud detection statistics","operationId":"fraudGetStatistics","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/fraud\/patterns":{"get":{"tags":["Fraud Detection"],"summary":"Get detected fraud patterns","operationId":"fraudGetPatterns","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/fraud\/cases":{"get":{"tags":["Fraud Detection"],"summary":"List all fraud cases","operationId":"fraudGetCases","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"meta":{"properties":{"total":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/fraud\/cases\/{id}":{"get":{"tags":["Fraud Detection"],"summary":"Get details of a specific fraud case","operationId":"fraudGetCaseDetails","parameters":[{"name":"id","in":"path","description":"Case ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]},"put":{"tags":["Fraud Detection"],"summary":"Update a fraud case","operationId":"fraudUpdateCase","parameters":[{"name":"id","in":"path","description":"Case ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"status":{"type":"string"},"notes":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string"},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/gdpr\/consent-status":{"get":{"tags":["GDPR"],"summary":"Get user's consent status","description":"Retrieve the current consent status for various data processing activities","operationId":"getGdprConsentStatus","responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"consents":{"properties":{"privacy_policy":{"type":"boolean","example":true},"terms":{"type":"boolean","example":true},"marketing":{"type":"boolean","example":false},"data_retention":{"type":"boolean","example":true}},"type":"object"},"dates":{"properties":{"privacy_policy_accepted_at":{"type":"string","format":"date-time","nullable":true},"terms_accepted_at":{"type":"string","format":"date-time","nullable":true},"marketing_consent_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/gdpr\/consent":{"post":{"tags":["GDPR"],"summary":"Update user's consent preferences","description":"Update consent preferences for various data processing activities","operationId":"updateGdprConsent","requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"privacy_policy":{"type":"boolean","example":true},"terms":{"type":"boolean","example":true},"marketing":{"type":"boolean","example":false},"data_retention":{"type":"boolean","example":true}},"type":"object"}}}},"responses":{"200":{"description":"Consent updated successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Consent preferences updated successfully"}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ValidationError"}}}}},"security":[{"sanctum":[]}]}},"\/api\/gdpr\/export":{"post":{"tags":["GDPR"],"summary":"Request data export (GDPR Article 20)","description":"Request a complete export of all personal data in a machine-readable format. Returns 202 and processes asynchronously.","operationId":"requestGdprDataExport","responses":{"202":{"description":"Export request accepted for processing","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Data export request accepted. Check status at the provided URL."},"export_id":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"status_url":{"type":"string","example":"\/api\/gdpr\/export\/550e8400-e29b-41d4-a716-446655440000"}},"type":"object"}}}},"500":{"description":"Server error","content":{"application\/json":{"schema":{"properties":{"error":{"type":"string","example":"Failed to process data export request"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/gdpr\/export\/{exportId}":{"get":{"tags":["GDPR"],"summary":"Check data export status","description":"Poll the status of a previously requested data export","operationId":"getGdprExportStatus","parameters":[{"name":"exportId","in":"path","description":"Export request ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Export status","content":{"application\/json":{"schema":{"properties":{"export_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","processing","completed","failed"]}},"type":"object"}}}},"404":{"description":"Export request not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/user\/data-export\/{exportId}\/download":{"get":{"tags":["GDPR"],"summary":"Download completed GDPR data export","description":"Download the exported data as a JSON file. Requires a valid signed URL.","operationId":"downloadGdprExport","parameters":[{"name":"exportId","in":"path","description":"Export request ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"JSON file download","content":{"application\/json":{"schema":{"type":"object"}}}},"403":{"description":"Invalid or expired signature"},"404":{"description":"Export file not found"}},"security":[{"sanctum":[]}]}},"\/api\/gdpr\/delete":{"post":{"tags":["GDPR"],"summary":"Request account deletion (GDPR Article 17)","description":"Request complete deletion of account and personal data (right to be forgotten)","operationId":"requestGdprAccountDeletion","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["confirm"],"properties":{"confirm":{"description":"Confirmation of deletion request","type":"boolean","example":true},"reason":{"type":"string","example":"No longer using the service","maxLength":500}},"type":"object"}}}},"responses":{"200":{"description":"Deletion request successful","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Account deletion request processed. Your account will be deleted within 30 days."}},"type":"object"}}}},"400":{"description":"Deletion not allowed","content":{"application\/json":{"schema":{"properties":{"error":{"type":"string","example":"Account cannot be deleted at this time"},"reasons":{"type":"array","items":{"type":"string"},"example":["Outstanding balance","Active loans"]}},"type":"object"}}}},"422":{"description":"Validation error"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/gdpr\/retention-policy":{"get":{"tags":["GDPR"],"summary":"Get data retention policy","description":"Retrieve information about data retention periods and user rights under GDPR","operationId":"getGdprRetentionPolicy","responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"policy":{"properties":{"transaction_data":{"type":"string","example":"7 years (regulatory requirement)"},"kyc_documents":{"type":"string","example":"5 years after account closure"},"audit_logs":{"type":"string","example":"3 years"},"marketing_data":{"type":"string","example":"Until consent withdrawn"},"inactive_accounts":{"type":"string","example":"Deleted after 2 years of inactivity"}},"type":"object"},"user_rights":{"properties":{"access":{"type":"string","example":"You can request a copy of your data at any time"},"rectification":{"type":"string","example":"You can update your personal information"},"erasure":{"type":"string","example":"You can request deletion (subject to legal requirements)"},"portability":{"type":"string","example":"You can export your data in machine-readable format"},"object":{"type":"string","example":"You can object to certain processing activities"}},"type":"object"}},"type":"object"}}}}}}},"\/api\/compliance\/gdpr\/v2\/register":{"get":{"tags":["GDPR Enhanced"],"summary":"Get processing activities register","description":"Returns the GDPR Article 30 processing activities register","operationId":"gDPREnhancedGetRegister","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/gdpr\/v2\/register\/activities":{"post":{"tags":["GDPR Enhanced"],"summary":"Create a processing activity","description":"Creates a new processing activity in the Article 30 register","operationId":"gDPREnhancedCreateActivity","responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/gdpr\/v2\/register\/completeness":{"get":{"tags":["GDPR Enhanced"],"summary":"Get register completeness check","description":"Checks completeness of the processing register","operationId":"gDPREnhancedGetRegisterCompleteness","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/gdpr\/v2\/dpia":{"get":{"tags":["GDPR Enhanced"],"summary":"Get DPIA summary","description":"Returns Data Protection Impact Assessment summary","operationId":"gDPREnhancedGetDpiaSummary","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]},"post":{"tags":["GDPR Enhanced"],"summary":"Create a DPIA","description":"Creates a new Data Protection Impact Assessment","operationId":"gDPREnhancedCreateDpia","responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/gdpr\/v2\/dpia\/{id}\/approve":{"post":{"tags":["GDPR Enhanced"],"summary":"Approve a DPIA","description":"Approves a Data Protection Impact Assessment","operationId":"gDPREnhancedApproveDpia","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/gdpr\/v2\/breaches":{"get":{"tags":["GDPR Enhanced"],"summary":"Get breach summary","description":"Returns data breach notification summary","operationId":"gDPREnhancedGetBreachSummary","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]},"post":{"tags":["GDPR Enhanced"],"summary":"Report a data breach","description":"Reports a new data breach with 72h notification deadline","operationId":"gDPREnhancedReportBreach","responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/gdpr\/v2\/breaches\/{id}\/notify-authority":{"post":{"tags":["GDPR Enhanced"],"summary":"Notify authority about a breach","description":"Records authority notification for a data breach","operationId":"gDPREnhancedNotifyAuthority","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/gdpr\/v2\/breaches\/deadlines":{"get":{"tags":["GDPR Enhanced"],"summary":"Check breach deadlines","description":"Checks breach notification deadline status","operationId":"gDPREnhancedCheckDeadlines","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/gdpr\/v2\/consent":{"get":{"tags":["GDPR Enhanced"],"summary":"Get consent status","description":"Returns consent status for the authenticated user","operationId":"gDPREnhancedGetConsentStatus","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]},"post":{"tags":["GDPR Enhanced"],"summary":"Record a consent decision","description":"Records a consent decision for the authenticated user","operationId":"gDPREnhancedRecordConsent","responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/gdpr\/v2\/retention":{"get":{"tags":["GDPR Enhanced"],"summary":"Get retention policy summary","description":"Returns data retention policy summary","operationId":"gDPREnhancedGetRetentionSummary","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/gdpr\/v2\/retention\/policies":{"post":{"tags":["GDPR Enhanced"],"summary":"Create a retention policy","description":"Creates a new data retention policy","operationId":"gDPREnhancedCreateRetentionPolicy","responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/hardware-wallet\/register":{"post":{"tags":["Hardware Wallets"],"summary":"Register a hardware wallet device","description":"Register a hardware wallet device.","operationId":"fe1f603ef2717967e6d19f7a44174895","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["device_type","device_id","public_key","address","chain"],"properties":{"device_type":{"type":"string","enum":["ledger_nano_s","ledger_nano_x","trezor_one","trezor_model_t"]},"device_id":{"type":"string"},"device_label":{"type":"string"},"firmware_version":{"type":"string"},"public_key":{"type":"string"},"address":{"type":"string"},"chain":{"type":"string","enum":["ethereum","bitcoin","polygon","bsc"]},"derivation_path":{"type":"string"},"supported_chains":{"type":"array","items":{"type":"string"}}},"type":"object"}}}},"responses":{"201":{"description":"Device registered successfully"},"422":{"description":"Validation error"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/hardware-wallet\/signing-request":{"post":{"tags":["Hardware Wallets"],"summary":"Create a signing request","description":"Create a signing request for a hardware wallet transaction.","operationId":"a2e3511b424898f10880dde61dd9c506","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["association_id","transaction"],"properties":{"association_id":{"type":"string","format":"uuid"},"transaction":{"required":["from","to","value","chain"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string"},"chain":{"type":"string"},"data":{"type":"string"},"gas_limit":{"type":"string"},"gas_price":{"type":"string"},"nonce":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"responses":{"201":{"description":"Signing request created"},"422":{"description":"Validation error"},"404":{"description":"Association not found"}},"security":[{"sanctum":[]}]}},"\/api\/hardware-wallet\/signing-request\/{id}\/submit":{"post":{"tags":["Hardware Wallets"],"summary":"Submit signature for signing request","description":"Submit a signature for a pending signing request.","operationId":"8811a07cb1f2d1bbce58ef5a376384cd","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["signature","public_key"],"properties":{"signature":{"type":"string"},"public_key":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Signature submitted successfully"},"422":{"description":"Validation error or signature invalid"},"404":{"description":"Signing request not found"}},"security":[{"sanctum":[]}]}},"\/api\/hardware-wallet\/signing-request\/{id}":{"get":{"tags":["Hardware Wallets"],"summary":"Get signing request status","description":"Get status of a signing request.","operationId":"205e20ce973b3593de9c434d5deb6fd7","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Signing request details"},"404":{"description":"Signing request not found"}},"security":[{"sanctum":[]}]}},"\/api\/hardware-wallet\/associations":{"get":{"tags":["Hardware Wallets"],"summary":"List user's registered hardware wallets","description":"List user's hardware wallet associations.","operationId":"f251b99725fbba8ef1b23151547197c4","parameters":[{"name":"chain","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"List of hardware wallet associations"}},"security":[{"sanctum":[]}]}},"\/api\/hardware-wallet\/associations\/{uuid}":{"delete":{"tags":["Hardware Wallets"],"summary":"Remove a hardware wallet association","description":"Remove a hardware wallet association.","operationId":"b3dbfc02dce02b0668bbd8a468edab31","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Association removed"},"404":{"description":"Association not found"}},"security":[{"sanctum":[]}]}},"\/api\/hardware-wallet\/signing-request\/{id}\/cancel":{"post":{"tags":["Hardware Wallets"],"summary":"Cancel a pending signing request","description":"Cancel a pending signing request.","operationId":"63f7bcdd6d76a7c3e99eefc827817c6d","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Signing request cancelled"},"404":{"description":"Signing request not found"},"422":{"description":"Cannot cancel request"}},"security":[{"sanctum":[]}]}},"\/api\/hardware-wallet\/supported":{"get":{"tags":["Hardware Wallets"],"summary":"Get supported hardware wallet types and chains","description":"Get supported device types and chains.","operationId":"de1702fb41a5a244dd9ae86b35eb62f1","responses":{"200":{"description":"Supported devices and chains"}}}},"\/api\/kyc\/status":{"get":{"tags":["KYC"],"summary":"Get KYC status for authenticated user","description":"Retrieve the current KYC verification status and documents for the authenticated user","operationId":"getKycStatus","responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"pending","enum":["unverified","pending","approved","rejected"]},"level":{"type":"string","example":"enhanced","enum":["basic","enhanced","full"]},"submitted_at":{"type":"string","format":"date-time","example":"2025-01-15T10:00:00Z"},"approved_at":{"type":"string","format":"date-time","nullable":true},"expires_at":{"type":"string","format":"date-time","nullable":true},"needs_kyc":{"type":"boolean","example":true},"documents":{"type":"array","items":{"properties":{"id":{"type":"string","example":"123"},"type":{"type":"string","example":"passport"},"status":{"type":"string","example":"approved"},"uploaded_at":{"type":"string","format":"date-time"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/kyc\/requirements":{"get":{"tags":["KYC"],"summary":"Get KYC requirements for a level","description":"Retrieve the document requirements for a specific KYC verification level","operationId":"getKycRequirements","parameters":[{"name":"level","in":"query","description":"KYC verification level","required":true,"schema":{"type":"string","enum":["basic","enhanced","full"]}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"level":{"type":"string","example":"enhanced"},"requirements":{"type":"array","items":{"properties":{"document_type":{"type":"string","example":"passport"},"description":{"type":"string","example":"Valid passport copy"},"required":{"type":"boolean","example":true}},"type":"object"}}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ValidationError"}}}}}}},"\/api\/kyc\/submit":{"post":{"tags":["KYC"],"summary":"Submit KYC documents","description":"Submit KYC verification documents for review","operationId":"submitKycDocuments","requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"properties":{"documents":{"type":"array","items":{"properties":{"type":{"type":"string","enum":["passport","national_id","drivers_license","residence_permit","utility_bill","bank_statement","selfie","proof_of_income","other"]},"file":{"description":"Document file (jpg, jpeg, png, pdf - max 10MB)","type":"string","format":"binary"}},"type":"object"}}},"type":"object"}}}},"responses":{"200":{"description":"Documents submitted successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"KYC documents submitted successfully"},"status":{"type":"string","example":"pending"}},"type":"object"}}}},"400":{"description":"Bad request - KYC already approved","content":{"application\/json":{"schema":{"properties":{"error":{"type":"string","example":"KYC already approved"}},"type":"object"}}}},"422":{"description":"Validation error"},"500":{"description":"Server error","content":{"application\/json":{"schema":{"properties":{"error":{"type":"string","example":"Failed to submit KYC documents"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/kyc\/documents\/{documentId}\/download":{"get":{"tags":["KYC"],"summary":"Download a KYC document","description":"Download a previously uploaded KYC document. Users can only download their own documents.","operationId":"downloadKycDocument","parameters":[{"name":"documentId","in":"path","description":"The document ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Document file download","content":{"application\/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Document not found"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/kyc\/ondato\/start":{"post":{"tags":["KYC"],"summary":"Start Ondato identity verification","description":"Creates an Ondato identity verification session linked to a TrustCert application","operationId":"startOndatoVerification","requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"application_id":{"description":"TrustCertApplication ID","type":"string","example":"app_abc123"},"target_level":{"description":"Trust level (0-3)","type":"integer","example":2},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"}},"type":"object"}}}},"responses":{"200":{"description":"Verification session created","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"identity_verification_id":{"type":"string","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"},"verification_id":{"type":"string","example":"9c1a2b3d-4e5f-6789-abcd-ef0123456789"},"status":{"type":"string","example":"pending"}},"type":"object"}},"type":"object"}}}},"400":{"description":"KYC already approved or invalid application","content":{"application\/json":{"schema":{"properties":{"error":{"type":"string","example":"KYC already approved"}},"type":"object"}}}},"500":{"description":"Failed to start verification"}},"security":[{"sanctum":[]}]}},"\/api\/compliance\/kyc\/ondato\/status\/{verificationId}":{"get":{"tags":["KYC"],"summary":"Get Ondato verification status","description":"Retrieve the status of a specific Ondato KYC verification","operationId":"getOndatoVerificationStatus","parameters":[{"name":"verificationId","in":"path","description":"The KycVerification ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Verification status","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"verification_id":{"type":"string"},"status":{"type":"string","enum":["pending","in_progress","completed","failed","expired"]},"completed_at":{"type":"string","format":"date-time","nullable":true},"failure_reason":{"type":"string","nullable":true},"trust_cert_level":{"description":"Trust level (1-3) when completed","type":"integer","nullable":true}},"type":"object"}},"type":"object"}}}},"404":{"description":"Verification not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/treasury\/liquidity-forecast\/generate":{"post":{"tags":["Treasury"],"summary":"Generate liquidity forecast","description":"Generates a comprehensive liquidity forecast with risk metrics, scenario analysis, and actionable recommendations.","operationId":"liquidityForecastGenerate","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["treasury_id"],"properties":{"treasury_id":{"description":"Treasury account ID","type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"forecast_days":{"description":"Number of days to forecast (default: 30)","type":"integer","example":30,"maximum":365,"minimum":1},"scenarios":{"description":"Custom scenarios for stress testing","type":"array","items":{"properties":{"description":{"type":"string","example":"Market downturn"},"inflow_adjustment":{"type":"number","format":"float","example":0.7,"maximum":2,"minimum":0},"outflow_adjustment":{"type":"number","format":"float","example":1.5,"maximum":3,"minimum":0}},"type":"object"}}},"type":"object"}}}},"responses":{"200":{"description":"Forecast generated","content":{"application\/json":{"schema":{"properties":{"treasury_id":{"type":"string","format":"uuid"},"forecast_period":{"type":"integer","example":30},"generated_at":{"type":"string","format":"date-time"},"base_forecast":{"type":"array","items":{"type":"object"}},"scenarios":{"type":"object"},"risk_metrics":{"type":"object"},"alerts":{"type":"array","items":{"type":"object"}},"confidence_level":{"type":"number","format":"float","example":0.85},"recommendations":{"type":"array","items":{"type":"string"}}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"},"500":{"description":"Failed to generate forecast"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/treasury\/liquidity-forecast\/{treasuryId}\/current":{"get":{"tags":["Treasury"],"summary":"Get current liquidity position","description":"Calculates real-time liquidity metrics and coverage ratios for a treasury account.","operationId":"liquidityForecastCurrent","parameters":[{"name":"treasuryId","in":"path","description":"Treasury account ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Current liquidity position","content":{"application\/json":{"schema":{"properties":{"timestamp":{"type":"string","format":"date-time"},"available_liquidity":{"type":"number","format":"float","example":1000000},"committed_outflows_24h":{"type":"number","format":"float","example":50000},"expected_inflows_24h":{"type":"number","format":"float","example":75000},"net_position_24h":{"type":"number","format":"float","example":1025000},"coverage_ratio":{"type":"number","format":"float","example":20},"status":{"type":"string","example":"excellent"},"buffer_days":{"type":"integer","example":45}},"type":"object"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Failed to calculate liquidity"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/treasury\/liquidity-forecast\/workflow\/start":{"post":{"tags":["Treasury"],"summary":"Start forecasting workflow","description":"Initializes a continuous liquidity monitoring and forecasting workflow with configurable update intervals and automatic mitigation.","operationId":"liquidityForecastWorkflowStart","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["treasury_id"],"properties":{"treasury_id":{"description":"Treasury account ID","type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"forecast_days":{"description":"Days to forecast (default: 30)","type":"integer","example":30,"maximum":365,"minimum":1},"update_interval_hours":{"description":"Hours between forecast updates (default: 6)","type":"integer","example":6,"maximum":24,"minimum":1},"auto_mitigation":{"description":"Enable automatic mitigation actions (default: false)","type":"boolean","example":false}},"type":"object"}}}},"responses":{"200":{"description":"Workflow started","content":{"application\/json":{"schema":{"properties":{"workflow_id":{"type":"string","example":"liq-forecast-65a1b2c3"},"status":{"type":"string","example":"started"},"treasury_id":{"type":"string","format":"uuid"},"config":{"properties":{"forecast_days":{"type":"integer","example":30},"update_interval_hours":{"type":"integer","example":6},"auto_mitigation":{"type":"boolean","example":false}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"},"500":{"description":"Failed to start workflow"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/treasury\/liquidity-forecast\/{treasuryId}\/alerts":{"get":{"tags":["Treasury"],"summary":"Get forecast alerts","description":"Retrieves active liquidity alerts for a treasury account, optionally filtered by severity level.","operationId":"liquidityForecastAlerts","parameters":[{"name":"treasuryId","in":"path","description":"Treasury account ID","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"level","in":"query","description":"Filter by alert level","required":false,"schema":{"type":"string","enum":["critical","warning","info"]}}],"responses":{"200":{"description":"List of alerts","content":{"application\/json":{"schema":{"properties":{"alerts":{"type":"array","items":{"properties":{"level":{"type":"string","example":"critical"},"type":{"type":"string","example":"lcr_breach"},"message":{"type":"string","example":"Liquidity Coverage Ratio below regulatory minimum"},"value":{"type":"number","format":"float","example":0.85},"threshold":{"type":"number","format":"float","example":1},"action_required":{"type":"boolean","example":true}},"type":"object"}},"count":{"type":"integer","example":1},"has_critical":{"type":"boolean","example":true}},"type":"object"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Failed to retrieve alerts"}},"security":[{"sanctum":[]}]}},"\/api\/liquidity\/pools":{"get":{"tags":["Liquidity Pool"],"summary":"Get all active liquidity pools","operationId":"cf91af4d0abbb407bfaf067aab2c2ae0","responses":{"200":{"description":"List of active pools","content":{"application\/json":{"schema":{"properties":{"pools":{"type":"array","items":{"properties":{"pool_id":{"type":"string"},"base_currency":{"type":"string"},"quote_currency":{"type":"string"},"tvl":{"type":"string"},"apy":{"type":"string"}},"type":"object"}}},"type":"object"}}}}}},"post":{"tags":["Liquidity Pool"],"summary":"Create a new liquidity pool","operationId":"7a48cd68e4ddb1583b8c578fe3f75804","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["base_currency","quote_currency"],"properties":{"base_currency":{"type":"string","example":"BTC"},"quote_currency":{"type":"string","example":"EUR"},"fee_rate":{"type":"string","example":"0.003"}},"type":"object"}}}},"responses":{"201":{"description":"Pool created","content":{"application\/json":{"schema":{"properties":{"pool_id":{"type":"string"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/liquidity\/pools\/{poolId}":{"get":{"tags":["Liquidity Pool"],"summary":"Get pool details","operationId":"4322a89ca0d29c8de3dbda2fe4b93244","parameters":[{"name":"poolId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Pool details with metrics"}}}},"\/api\/liquidity\/add":{"post":{"tags":["Liquidity Pool"],"summary":"Add liquidity to a pool","operationId":"84774894371f9b79a160772beb0fa27f","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["pool_id","base_amount","quote_amount"],"properties":{"pool_id":{"type":"string","format":"uuid"},"base_amount":{"type":"string","example":"0.1"},"quote_amount":{"type":"string","example":"4800"},"min_shares":{"type":"string","example":"0"}},"type":"object"}}}},"responses":{"200":{"description":"Liquidity added"}},"security":[{"bearerAuth":[]}]}},"\/api\/liquidity\/remove":{"post":{"tags":["Liquidity Pool"],"summary":"Remove liquidity from a pool","operationId":"5c35804ff51fc937be483bd9df16a0a3","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["pool_id","shares"],"properties":{"pool_id":{"type":"string","format":"uuid"},"shares":{"type":"string","example":"100"},"min_base_amount":{"type":"string","example":"0"},"min_quote_amount":{"type":"string","example":"0"}},"type":"object"}}}},"responses":{"200":{"description":"Liquidity removed"}},"security":[{"bearerAuth":[]}]}},"\/api\/liquidity\/swap":{"post":{"tags":["Liquidity Pool"],"summary":"Execute a swap through liquidity pool","operationId":"1c259535f720c34736de7875fbbad065","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["pool_id","input_currency","input_amount"],"properties":{"pool_id":{"type":"string","format":"uuid"},"input_currency":{"type":"string","example":"BTC"},"input_amount":{"type":"string","example":"0.1"},"min_output_amount":{"type":"string","example":"4700"}},"type":"object"}}}},"responses":{"200":{"description":"Swap executed"}},"security":[{"bearerAuth":[]}]}},"\/api\/liquidity\/positions":{"get":{"tags":["Liquidity Pool"],"summary":"Get user's liquidity positions","operationId":"097a4b0617c5cabfea6bf62667b14c85","responses":{"200":{"description":"User's positions"}},"security":[{"bearerAuth":[]}]}},"\/api\/liquidity\/claim-rewards":{"post":{"tags":["Liquidity Pool"],"summary":"Claim pending rewards","operationId":"3a923f99a81ce4eeafea391af387da62","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["pool_id"],"properties":{"pool_id":{"type":"string","format":"uuid"}},"type":"object"}}}},"responses":{"200":{"description":"Rewards claimed"}},"security":[{"bearerAuth":[]}]}},"\/api\/liquidity\/il-protection\/{positionId}":{"get":{"tags":["Liquidity Pool"],"summary":"Calculate impermanent loss for a position","operationId":"711c9edfdc3347647ab277dfb48957e1","parameters":[{"name":"positionId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"IL calculation details","content":{"application\/json":{"schema":{"properties":{"position_id":{"type":"integer"},"entry_price":{"type":"string"},"current_price":{"type":"string"},"impermanent_loss":{"type":"string"},"impermanent_loss_percent":{"type":"string"},"is_protected":{"type":"boolean"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/liquidity\/il-protection\/enable":{"post":{"tags":["Liquidity Pool"],"summary":"Enable IL protection for a pool","operationId":"06ef3bc4108dbde97f53f49e4af66e1d","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["pool_id"],"properties":{"pool_id":{"type":"string","format":"uuid"},"protection_threshold":{"type":"string","example":"0.02"},"max_coverage":{"type":"string","example":"0.80"},"min_holding_hours":{"type":"integer","example":168},"fund_size":{"type":"string","example":"100000"}},"type":"object"}}}},"responses":{"200":{"description":"IL protection enabled"}},"security":[{"bearerAuth":[]}]}},"\/api\/liquidity\/il-protection\/process-claims":{"post":{"tags":["Liquidity Pool"],"summary":"Process IL protection claims for a pool","operationId":"04688a16dee0062eadff31e36ff6f055","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["pool_id"],"properties":{"pool_id":{"type":"string","format":"uuid"}},"type":"object"}}}},"responses":{"200":{"description":"Claims processed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean"},"claims":{"type":"array","items":{"properties":{"provider_id":{"type":"string"},"compensation":{"type":"string"},"compensation_currency":{"type":"string"}},"type":"object"}}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/liquidity\/il-protection\/fund-requirements\/{poolId}":{"get":{"tags":["Liquidity Pool"],"summary":"Get IL protection fund requirements","operationId":"9fea64396457896706bf3cd47b0316e2","parameters":[{"name":"poolId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Fund requirements","content":{"application\/json":{"schema":{"properties":{"pool_id":{"type":"string"},"total_liquidity_value":{"type":"string"},"protected_value":{"type":"string"},"max_potential_compensation":{"type":"string"},"recommended_fund_size":{"type":"string"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/liquidity\/analytics\/{poolId}":{"get":{"tags":["Liquidity Pool"],"summary":"Get pool analytics and performance metrics","operationId":"f726e551170dc04ba0e1338195141b7c","parameters":[{"name":"poolId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Pool analytics","content":{"application\/json":{"schema":{"properties":{"pool_id":{"type":"string"},"tvl":{"type":"string"},"volume_24h":{"type":"string"},"fees_24h":{"type":"string"},"apy":{"type":"string"},"provider_count":{"type":"integer"},"price_history":{"type":"array","items":{"properties":{"timestamp":{"type":"string"},"price":{"type":"string"}},"type":"object"}}},"type":"object"}}}}}}},"\/api\/v1\/lending\/applications":{"get":{"tags":["Lending"],"summary":"List loan applications","description":"Returns a paginated list of the authenticated user's loan applications ordered by submission date.","operationId":"loanApplicationsList","responses":{"200":{"description":"Paginated list of loan applications","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"string","example":"app_uuid"},"borrower_id":{"type":"string"},"status":{"type":"string","example":"submitted"},"requested_amount":{"type":"number","example":10000},"term_months":{"type":"integer","example":12},"purpose":{"type":"string","example":"personal"},"submitted_at":{"type":"string","format":"date-time"}},"type":"object"}},"current_page":{"type":"integer","example":1},"last_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":10},"total":{"type":"integer","example":5}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]},"post":{"tags":["Lending"],"summary":"Submit loan application","description":"Submits a new loan application for processing. The application undergoes credit assessment and risk scoring.","operationId":"loanApplicationsStore","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["requested_amount","term_months","purpose","employment_status","monthly_income","monthly_expenses"],"properties":{"requested_amount":{"description":"Loan amount requested","type":"number","format":"float","example":15000,"maximum":100000,"minimum":1000},"term_months":{"description":"Loan term in months","type":"integer","example":24,"maximum":60,"minimum":6},"purpose":{"description":"Purpose of the loan","type":"string","example":"personal","enum":["personal","business","debt_consolidation","education","medical","home_improvement","other"]},"employment_status":{"description":"Borrower's employment status","type":"string","example":"employed"},"monthly_income":{"description":"Monthly income","type":"number","format":"float","example":5000,"minimum":0},"monthly_expenses":{"description":"Monthly expenses","type":"number","format":"float","example":2000,"minimum":0},"additional_info":{"description":"Optional additional information","type":"string","example":"First-time borrower","maxLength":500}},"type":"object"}}}},"responses":{"201":{"description":"Application submitted","content":{"application\/json":{"schema":{"properties":{"application":{"properties":{"id":{"type":"string","example":"app_uuid"},"status":{"type":"string","example":"submitted"},"requested_amount":{"type":"number","example":15000},"term_months":{"type":"integer","example":24}},"type":"object"},"result":{"description":"Processing result from credit assessment","type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/lending\/applications\/{id}":{"get":{"tags":["Lending"],"summary":"Show loan application","description":"Returns detailed information about a specific loan application.","operationId":"loanApplicationsShow","parameters":[{"name":"id","in":"path","description":"Loan application ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Loan application details","content":{"application\/json":{"schema":{"properties":{"id":{"type":"string","example":"app_uuid"},"borrower_id":{"type":"string"},"status":{"type":"string","example":"submitted"},"requested_amount":{"type":"number","example":10000},"term_months":{"type":"integer","example":12},"purpose":{"type":"string","example":"personal"},"submitted_at":{"type":"string","format":"date-time"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Application not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/lending\/applications\/{id}\/cancel":{"post":{"tags":["Lending"],"summary":"Cancel loan application","description":"Cancels a submitted loan application. Only applications with 'submitted' status can be cancelled.","operationId":"loanApplicationsCancel","parameters":[{"name":"id","in":"path","description":"Loan application ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Application cancelled","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Application cancelled successfully"},"application":{"properties":{"id":{"type":"string"},"status":{"type":"string","example":"cancelled"},"rejected_by":{"type":"string","example":"borrower"},"rejected_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Application not found or not in submitted status"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/lending\/loans":{"get":{"tags":["Lending"],"summary":"List loans","description":"Returns a paginated list of the authenticated user's loans with their applications and repayments.","operationId":"loansList","responses":{"200":{"description":"Paginated list of loans","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"string","example":"loan_uuid"},"borrower_id":{"type":"string"},"status":{"type":"string","example":"active"},"application":{"type":"object"},"repayments":{"type":"array","items":{"type":"object"}}},"type":"object"}},"current_page":{"type":"integer","example":1},"last_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":10},"total":{"type":"integer","example":3}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/lending\/loans\/{id}":{"get":{"tags":["Lending"],"summary":"Show loan details","description":"Returns detailed information about a specific loan including next payment and outstanding balance.","operationId":"loansShow","parameters":[{"name":"id","in":"path","description":"Loan ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Loan details","content":{"application\/json":{"schema":{"properties":{"loan":{"properties":{"id":{"type":"string"},"borrower_id":{"type":"string"},"status":{"type":"string","example":"active"},"application":{"type":"object"},"repayments":{"type":"array","items":{"type":"object"}}},"type":"object"},"next_payment":{"type":"object"},"outstanding_balance":{"type":"string","example":"5000.00"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Loan not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/lending\/loans\/{id}\/payments":{"post":{"tags":["Lending"],"summary":"Make a loan payment","description":"Records a repayment against a scheduled payment for an active loan.","operationId":"loansMakePayment","parameters":[{"name":"id","in":"path","description":"Loan ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["amount","payment_number"],"properties":{"amount":{"description":"Payment amount","type":"number","format":"float","example":250,"minimum":0.01},"payment_number":{"description":"Scheduled payment number","type":"integer","example":1,"minimum":1}},"type":"object"}}}},"responses":{"200":{"description":"Payment recorded","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Payment recorded successfully"},"loan":{"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid payment number"},"401":{"description":"Unauthorized"},"404":{"description":"Loan not found"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/lending\/loans\/{id}\/settlement-quote":{"get":{"tags":["Lending"],"summary":"Get early settlement quote","description":"Calculates the early settlement amount for a loan, showing outstanding balance, settlement amount, and potential savings.","operationId":"loansSettlementQuote","parameters":[{"name":"id","in":"path","description":"Loan ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Settlement quote","content":{"application\/json":{"schema":{"properties":{"loan_id":{"type":"string","example":"loan_uuid"},"outstanding_balance":{"type":"string","example":"5000.00"},"settlement_amount":{"type":"string","example":"4800.00"},"savings":{"type":"string","example":"200.00"},"confirm_url":{"type":"string","example":"\/api\/v1\/lending\/loans\/loan_uuid\/settle"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Loan not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/lending\/loans\/{id}\/settle":{"post":{"tags":["Lending"],"summary":"Confirm early settlement","description":"Confirms and processes the early settlement of a loan. The loan must be in active or delinquent status.","operationId":"loansConfirmSettlement","parameters":[{"name":"id","in":"path","description":"Loan ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Loan settled","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Loan settled successfully"},"loan":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Loan not found"}},"security":[{"sanctum":[]}]}},"\/api\/ai\/mcp\/tools":{"get":{"tags":["MCP Tools"],"summary":"List available MCP tools","description":"Get a list of all available MCP tools that can be used by AI agents","operationId":"listMcpTools","responses":{"200":{"description":"List of available MCP tools","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"name":{"type":"string","example":"get_account_balance"},"description":{"type":"string","example":"Retrieve the current balance for a customer account"},"category":{"type":"string","example":"account_management"},"parameters":{"type":"object"},"requires_auth":{"type":"boolean","example":true},"rate_limit":{"type":"integer","example":100}},"type":"object"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/ai\/mcp\/tools\/{tool}\/execute":{"post":{"tags":["MCP Tools"],"summary":"Execute an MCP tool","description":"Execute a specific MCP tool with the provided parameters","operationId":"executeMcpTool","parameters":[{"name":"tool","in":"path","description":"The name of the tool to execute","required":true,"schema":{"type":"string","example":"get_account_balance"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"parameters":{"type":"object","example":{"account_id":"acct_123","include_pending":true}}},"type":"object"}}}},"responses":{"200":{"description":"Tool execution result","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"tool":{"type":"string","example":"get_account_balance"},"result":{"type":"object"},"execution_time_ms":{"type":"integer","example":145},"metadata":{"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid parameters or tool not found"},"429":{"description":"Rate limit exceeded"}},"security":[{"sanctum":[]}]}},"\/api\/ai\/mcp\/tools\/{tool}":{"get":{"tags":["MCP Tools"],"summary":"Get MCP tool details","description":"Get detailed information about a specific MCP tool","operationId":"getMcpToolDetails","parameters":[{"name":"tool","in":"path","description":"The name of the tool","required":true,"schema":{"type":"string","example":"get_account_balance"}}],"responses":{"200":{"description":"Tool details","content":{"application\/json":{"schema":{"properties":{"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"parameters":{"type":"object"},"examples":{"type":"array","items":{"type":"object"}},"rate_limit":{"type":"integer"},"requires_auth":{"type":"boolean"}},"type":"object"}}}},"404":{"description":"Tool not found"}},"security":[{"sanctum":[]}]}},"\/api\/ai\/mcp\/register":{"post":{"tags":["MCP Tools"],"summary":"Register a new MCP tool","description":"Register a custom MCP tool for use by AI agents","operationId":"registerMcpTool","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name","description","endpoint","parameters"],"properties":{"name":{"type":"string","example":"custom_tool"},"description":{"type":"string","example":"A custom tool for specific operations"},"endpoint":{"type":"string","format":"url","example":"https:\/\/api.example.com\/tool"},"parameters":{"type":"object"},"category":{"type":"string","example":"custom"},"requires_auth":{"type":"boolean","example":true},"rate_limit":{"type":"integer","example":50}},"type":"object"}}}},"responses":{"201":{"description":"Tool registered successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"tool_id":{"type":"string","example":"tool_abc123"},"message":{"type":"string","example":"Tool registered successfully"}},"type":"object"}}}},"400":{"description":"Invalid tool configuration"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/mpp\/payments":{"get":{"tags":["Machine Payments"],"summary":"List MPP payment history","description":"Returns paginated payment history with optional rail and status filters.","operationId":"mppPayments","parameters":[{"name":"rail","in":"query","description":"Filter by rail (stripe, tempo, lightning, card, x402)","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by status (pending, settled, failed)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Payment history","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean"},"data":{"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/mpp\/payments\/stats":{"get":{"tags":["Machine Payments"],"summary":"Payment statistics","description":"Returns aggregate statistics: total payments, settled\/failed counts, total volume, and breakdown by rail.","operationId":"mppPaymentStats","responses":{"200":{"description":"Payment stats","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean"},"data":{"properties":{"total_payments":{"type":"integer"},"settled":{"type":"integer"},"failed":{"type":"integer"},"total_settled_cents":{"type":"integer"},"by_rail":{"type":"object"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/mpp\/spending-limits":{"get":{"tags":["Machine Payments"],"summary":"List agent spending limits","description":"Returns all configured agent spending limits for MPP payments.","operationId":"mppSpendingLimits","responses":{"200":{"description":"Spending limits"}},"security":[{"sanctum":[]}]},"post":{"tags":["Machine Payments"],"summary":"Set or update a spending limit","description":"Creates or updates daily and per-transaction spending limits for an agent.","operationId":"mppSetSpendingLimit","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["agent_id","daily_limit","per_tx_limit"],"properties":{"agent_id":{"type":"string"},"daily_limit":{"type":"integer","example":5000000},"per_tx_limit":{"type":"integer","example":100000},"auto_pay":{"type":"boolean","example":true}},"type":"object"}}}},"responses":{"201":{"description":"Spending limit set"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/mpp\/spending-limits\/{agentId}":{"delete":{"tags":["Machine Payments"],"summary":"Delete a spending limit","operationId":"mppDeleteSpendingLimit","parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Spending limit deleted"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/mpp\/resources":{"get":{"tags":["Machine Payments"],"summary":"List monetized resources","description":"Returns paginated list of API endpoints that require MPP payment. Filter active-only by default.","operationId":"mppResources","parameters":[{"name":"active_only","in":"query","description":"Filter to active resources only (default: true)","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Monetized resources"}},"security":[{"sanctum":[]}]},"post":{"tags":["Machine Payments"],"summary":"Create a monetized resource","description":"Register an API endpoint for MPP payment gating. Admin only. Blocked for auth\/admin\/monitoring\/webhook paths.","operationId":"mppCreateResource","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["method","path","amount_cents","currency","available_rails"],"properties":{"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"path":{"type":"string","example":"v1\/sms\/send"},"amount_cents":{"type":"integer","example":5000},"currency":{"type":"string","example":"USD"},"available_rails":{"type":"array","items":{"type":"string","enum":["stripe","tempo","lightning","card","x402"]}},"description":{"type":"string","nullable":true}},"type":"object"}}}},"responses":{"201":{"description":"Resource created"},"409":{"description":"Duplicate method+path"},"422":{"description":"Validation error or blocked path"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/mpp\/resources\/{id}":{"get":{"tags":["Machine Payments"],"summary":"Get a monetized resource","operationId":"mppShowResource","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Resource details"},"404":{"description":"Not found"}},"security":[{"sanctum":[]}]},"put":{"tags":["Machine Payments"],"summary":"Update a monetized resource","description":"Update pricing, rails, or active status. Admin only.","operationId":"mppUpdateResource","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"amount_cents":{"type":"integer"},"currency":{"type":"string"},"available_rails":{"type":"array","items":{"type":"string"}},"is_active":{"type":"boolean"}},"type":"object"}}}},"responses":{"200":{"description":"Resource updated"},"404":{"description":"Not found"}},"security":[{"sanctum":[]}]},"delete":{"tags":["Machine Payments"],"summary":"Delete a monetized resource","description":"Remove an API endpoint from MPP payment gating. Admin only.","operationId":"mppDeleteResource","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Resource deleted"},"404":{"description":"Not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/mpp\/status":{"get":{"tags":["Machine Payments"],"summary":"MPP protocol status","description":"Returns whether MPP is enabled, protocol version, available payment rails, and MCP binding status.","operationId":"mppStatus","responses":{"200":{"description":"Protocol status","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean"},"data":{"properties":{"enabled":{"type":"boolean"},"version":{"type":"integer"},"available_rails":{"type":"array","items":{"type":"string"}},"rail_count":{"type":"integer"},"mcp_enabled":{"type":"boolean"},"spec_url":{"type":"string"}},"type":"object"}},"type":"object"}}}}}}},"\/api\/v1\/mpp\/supported-rails":{"get":{"tags":["Machine Payments"],"summary":"List supported payment rails","description":"Returns detailed info for each payment rail: Stripe SPT, Tempo, Lightning, Card, and x402 USDC.","operationId":"mppSupportedRails","responses":{"200":{"description":"Rail details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"supports_fiat":{"type":"boolean"},"supports_crypto":{"type":"boolean"},"currencies":{"type":"array","items":{"type":"string"}},"available":{"type":"boolean"}},"type":"object"}}},"type":"object"}}}}}}},"\/.well-known\/mpp-configuration":{"get":{"tags":["Machine Payments"],"summary":"MPP discovery endpoint","description":"Returns the .well-known\/mpp-configuration JSON for protocol discovery.","operationId":"mppWellKnown","responses":{"200":{"description":"MPP configuration JSON"}}}},"\/api\/metrics\/prometheus":{"get":{"tags":["Metrics"],"summary":"Export domain metrics in Prometheus format","description":"Returns domain-specific business metrics formatted for Prometheus scraping","operationId":"getDomainPrometheusMetrics","responses":{"200":{"description":"Prometheus metrics exported","content":{"text\/plain":{"schema":{"type":"string"}}}}}}},"\/api\/health":{"get":{"tags":["Metrics"],"summary":"Quick health check for load balancers","description":"Returns lightweight health status checking database and cache connectivity","operationId":"getQuickHealthStatus","responses":{"200":{"description":"Application is healthy","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","enum":["healthy","degraded"]},"checks":{"type":"object"},"version":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}},"type":"object"}}}},"503":{"description":"Application is degraded"}}}},"\/api\/v1\/user\/preferences":{"get":{"tags":["Mobile User Preferences"],"summary":"Get user mobile preferences","description":"Returns the authenticated user mobile preferences","operationId":"mobileUserPreferencesShow","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]},"patch":{"tags":["Mobile User Preferences"],"summary":"Update user mobile preferences","description":"Updates the authenticated user mobile preferences. Accepts fields at the top level or nested under a 'preferences' key.","operationId":"mobileUserPreferencesUpdate","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/mobile\/devices":{"get":{"tags":["Mobile"],"summary":"List user's registered mobile devices","description":"List user's mobile devices.","operationId":"listMobileDevices","responses":{"200":{"description":"List of devices"}},"security":[{"sanctum":[]}]},"post":{"tags":["Mobile"],"summary":"Register a mobile device","description":"Register a mobile device.","operationId":"registerMobileDevice","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["device_id","platform","app_version"],"properties":{"device_id":{"type":"string","maxLength":100},"platform":{"type":"string","enum":["ios","android"]},"app_version":{"type":"string","maxLength":20},"push_token":{"type":"string","maxLength":500},"device_name":{"type":"string","maxLength":100},"device_model":{"type":"string","maxLength":100},"os_version":{"type":"string","maxLength":50}},"type":"object"}}}},"responses":{"201":{"description":"Device registered successfully"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/mobile\/devices\/{id}":{"get":{"tags":["Mobile"],"summary":"Get a specific mobile device","description":"Get a specific device.","operationId":"getMobileDevice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Device details"},"404":{"description":"Device not found"}},"security":[{"sanctum":[]}]},"delete":{"tags":["Mobile"],"summary":"Unregister a mobile device","description":"Unregister a mobile device.","operationId":"unregisterMobileDevice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Device unregistered"},"404":{"description":"Device not found"}},"security":[{"sanctum":[]}]}},"\/api\/mobile\/devices\/{id}\/token":{"patch":{"tags":["Mobile"],"summary":"Update push notification token","description":"Update push token for a device.","operationId":"updatePushToken","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["push_token"],"properties":{"push_token":{"type":"string","maxLength":500}},"type":"object"}}}},"responses":{"200":{"description":"Token updated"},"404":{"description":"Device not found"}},"security":[{"sanctum":[]}]}},"\/api\/mobile\/auth\/biometric\/enable":{"post":{"tags":["Mobile"],"summary":"Enable biometric authentication for a device","description":"Enable biometric authentication.","operationId":"enableBiometric","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["device_id","public_key"],"properties":{"device_id":{"type":"string"},"public_key":{"description":"Base64 encoded ECDSA P-256 public key","type":"string"},"key_id":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Biometric enabled"},"400":{"description":"Invalid public key"},"404":{"description":"Device not found"}},"security":[{"sanctum":[]}]}},"\/api\/mobile\/auth\/biometric\/disable":{"delete":{"tags":["Mobile"],"summary":"Disable biometric authentication for a device","description":"Disable biometric authentication.","operationId":"disableBiometric","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["device_id"],"properties":{"device_id":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Biometric disabled"},"404":{"description":"Device not found"}},"security":[{"sanctum":[]}]}},"\/api\/mobile\/auth\/biometric\/challenge":{"post":{"tags":["Mobile"],"summary":"Get a challenge for biometric authentication","description":"Get biometric challenge for authentication.","operationId":"getBiometricChallenge","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["device_id"],"properties":{"device_id":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Challenge created"},"400":{"description":"Biometric not enabled"},"404":{"description":"Device not found"}}}},"\/api\/mobile\/auth\/biometric\/verify":{"post":{"tags":["Mobile"],"summary":"Verify biometric signature and get access token","description":"Verify biometric signature and get access token.","operationId":"verifyBiometric","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["device_id","challenge","signature"],"properties":{"device_id":{"type":"string"},"challenge":{"type":"string"},"signature":{"description":"Base64 encoded signature","type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Authentication successful"},"401":{"description":"Authentication failed"},"404":{"description":"Device not found"}}}},"\/api\/mobile\/notifications":{"get":{"tags":["Mobile"],"summary":"Get notification history","description":"Get notification history.","operationId":"getNotifications","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"Notification list"}},"security":[{"sanctum":[]}]}},"\/api\/mobile\/notifications\/{id}\/read":{"post":{"tags":["Mobile"],"summary":"Mark a notification as read","description":"Mark notification as read.","operationId":"markNotificationRead","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Marked as read"},"404":{"description":"Notification not found"}},"security":[{"sanctum":[]}]}},"\/api\/mobile\/notifications\/read-all":{"post":{"tags":["Mobile"],"summary":"Mark all notifications as read","description":"Mark all notifications as read.","operationId":"markAllNotificationsRead","responses":{"200":{"description":"All marked as read"}},"security":[{"sanctum":[]}]}},"\/api\/mobile\/config":{"get":{"tags":["Mobile"],"summary":"Get mobile app configuration","description":"Get mobile app configuration.","operationId":"getMobileConfig","responses":{"200":{"description":"App configuration"}}}},"\/api\/mobile\/devices\/{id}\/block":{"post":{"tags":["Mobile"],"summary":"Block a mobile device","description":"Block a mobile device.","operationId":"blockMobileDevice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Device blocked"},"404":{"description":"Device not found"}},"security":[{"sanctum":[]}]}},"\/api\/mobile\/devices\/{id}\/unblock":{"post":{"tags":["Mobile"],"summary":"Unblock a mobile device","description":"Unblock a mobile device.","operationId":"unblockMobileDevice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Device unblocked"},"404":{"description":"Device not found"}},"security":[{"sanctum":[]}]}},"\/api\/mobile\/devices\/{id}\/trust":{"post":{"tags":["Mobile"],"summary":"Mark a device as trusted","description":"Trust a mobile device.","operationId":"trustMobileDevice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Device trusted"},"404":{"description":"Device not found"}},"security":[{"sanctum":[]}]}},"\/api\/mobile\/sessions":{"get":{"tags":["Mobile"],"summary":"List active mobile sessions","description":"List active sessions for the authenticated user.","operationId":"listMobileSessions","responses":{"200":{"description":"List of active sessions"}},"security":[{"sanctum":[]}]},"delete":{"tags":["Mobile"],"summary":"Revoke all mobile sessions except current","description":"Revoke all sessions except the current one.","operationId":"revokeAllMobileSessions","responses":{"200":{"description":"Sessions revoked"}},"security":[{"sanctum":[]}]}},"\/api\/mobile\/sessions\/{id}":{"delete":{"tags":["Mobile"],"summary":"Revoke a specific mobile session","description":"Revoke a specific session.","operationId":"revokeMobileSession","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Session revoked"},"404":{"description":"Session not found"}},"security":[{"sanctum":[]}]}},"\/api\/mobile\/auth\/refresh":{"post":{"tags":["Mobile"],"summary":"Refresh the authentication token","description":"Refresh the authentication token.","operationId":"refreshMobileToken","responses":{"200":{"description":"Token refreshed"}},"security":[{"sanctum":[]}]}},"\/api\/mobile\/notifications\/preferences":{"get":{"tags":["Mobile"],"summary":"Get notification preferences","description":"Get notification preferences.","operationId":"getNotificationPreferences","responses":{"200":{"description":"Notification preferences"}},"security":[{"sanctum":[]}]},"put":{"tags":["Mobile"],"summary":"Update notification preferences","description":"Update notification preferences.","operationId":"updateNotificationPreferences","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["preferences"],"properties":{"preferences":{"description":"Map of notification category to preference settings","type":"object","example":{"transactions":{"push_enabled":true,"email_enabled":false}}}},"type":"object"}}}},"responses":{"200":{"description":"Preferences updated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/app\/status":{"get":{"tags":["Mobile"],"summary":"Get app version and maintenance status","description":"Get app status for mobile version\/maintenance check.","operationId":"getAppStatus","responses":{"200":{"description":"App status","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"min_version":{"type":"string","example":"1.0.0"},"latest_version":{"type":"string","example":"1.2.0"},"force_update":{"type":"boolean","example":false},"maintenance":{"type":"boolean","example":false},"maintenance_message":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}}}}},"\/api\/v1\/mobile\/ssl-pins":{"get":{"tags":["Mobile"],"summary":"Get SSL certificate pins for client-side certificate pinning","description":"Get SSL certificate pins for mobile certificate pinning.","operationId":"getSslPins","responses":{"200":{"description":"SSL certificate pins","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"pins":{"type":"array","items":{"properties":{"algorithm":{"type":"string","example":"sha256"},"hash":{"type":"string","example":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="}},"type":"object"}},"max_age":{"type":"integer","example":86400},"include_subdomains":{"type":"boolean","example":true}},"type":"object"}},"type":"object"}}}}}}},"\/api\/mobile\/devices\/all":{"delete":{"tags":["Mobile"],"summary":"Remove all registered devices for the current user","description":"Bulk remove all devices for the authenticated user.","operationId":"bulkRemoveDevices","responses":{"200":{"description":"All devices removed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"removed_count":{"type":"integer","example":3}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/activity":{"get":{"tags":["Mobile Payments"],"summary":"Get activity feed with cursor-based pagination","description":"Returns a paginated activity feed for the authenticated user. Supports cursor-based pagination and filtering by income\/expenses.","operationId":"mobilePaymentActivityFeed","parameters":[{"name":"cursor","in":"query","description":"Cursor for pagination (opaque string from previous response)","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of items per page (1-50, default 20)","required":false,"schema":{"type":"integer","default":20,"maximum":50,"minimum":1}},{"name":"filter","in":"query","description":"Filter activity type","required":false,"schema":{"type":"string","default":"all","enum":["all","income","expenses"]}}],"responses":{"200":{"description":"Activity feed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"items":{"type":"array","items":{"properties":{"id":{"type":"string"},"type":{"type":"string","example":"payment"},"amount":{"type":"number","example":25.5},"asset":{"type":"string","example":"USDC"},"created_at":{"type":"string","format":"date-time"}},"type":"object"}},"next_cursor":{"type":"string","example":"eyJpZCI6MTAwfQ==","nullable":true},"has_more":{"type":"boolean","example":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"VALIDATION_ERROR"},"message":{"type":"string","example":"The given data was invalid."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/networks\/status":{"get":{"tags":["Mobile Payments"],"summary":"Get the status of all supported payment networks","description":"Returns the current availability and health status of all supported payment networks (e.g., Solana, Tron). Useful for checking network congestion or downtime before initiating payments.","operationId":"mobilePaymentNetworkStatus","responses":{"200":{"description":"Network statuses","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"networks":{"type":"array","items":{"properties":{"network":{"type":"string","example":"SOLANA"},"status":{"type":"string","example":"operational","enum":["operational","degraded","down"]},"latency_ms":{"type":"integer","example":120},"block_height":{"type":"integer","example":245000000}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/payments\/intents":{"post":{"tags":["Mobile Payments"],"summary":"Create a new payment intent","description":"Creates a payment intent for a merchant transaction. Supports idempotency via X-Idempotency-Key header or body field. The intent must be submitted separately to authorize payment.","operationId":"mobilePaymentCreateIntent","parameters":[{"name":"X-Idempotency-Key","in":"header","description":"Idempotency key to prevent duplicate payments","required":false,"schema":{"type":"string","maxLength":128}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["merchantId","amount","asset","preferredNetwork"],"properties":{"merchantId":{"description":"Merchant identifier (max 64 chars)","type":"string","example":"merchant_abc123"},"amount":{"description":"Payment amount (must be > 0)","type":"number","example":25.5},"asset":{"description":"Payment asset","type":"string","example":"USDC","enum":["USDC"]},"preferredNetwork":{"description":"Preferred payment network","type":"string","example":"SOLANA","enum":["SOLANA","TRON"]},"shield":{"description":"Enable privacy shield","type":"boolean","example":false},"idempotencyKey":{"description":"Idempotency key (alternative to header)","type":"string","example":"idem_key_123"}},"type":"object"}}}},"responses":{"201":{"description":"Payment intent created","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"intentId":{"type":"string","example":"pi_abc123"},"status":{"type":"string","example":"PENDING"},"amount":{"type":"number","example":25.5},"asset":{"type":"string","example":"USDC"},"merchant":{"properties":{"displayName":{"type":"string","example":"Coffee Shop"}},"type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"404":{"description":"Merchant not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"MERCHANT_NOT_FOUND"},"message":{"type":"string","example":"Merchant not found."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error or payment intent creation failed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"PAYMENT_INTENT_ERROR"},"message":{"type":"string","example":"Unable to create payment intent."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/payments\/intents\/{intentId}":{"get":{"tags":["Mobile Payments"],"summary":"Get payment intent status","description":"Retrieves the current status and details of a payment intent by its ID.","operationId":"mobilePaymentGetIntent","parameters":[{"name":"intentId","in":"path","description":"Payment intent ID","required":true,"schema":{"type":"string","example":"pi_abc123"}}],"responses":{"200":{"description":"Payment intent details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"intentId":{"type":"string","example":"pi_abc123"},"status":{"type":"string","example":"PENDING"},"amount":{"type":"number","example":25.5},"asset":{"type":"string","example":"USDC"},"merchant":{"properties":{"displayName":{"type":"string","example":"Coffee Shop"}},"type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"404":{"description":"Payment intent not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"INTENT_NOT_FOUND"},"message":{"type":"string","example":"Payment intent not found."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/payments\/intents\/{intentId}\/submit":{"post":{"tags":["Mobile Payments"],"summary":"Submit and authorize a payment intent","description":"Submits a pending payment intent for authorization. The user must authenticate via biometric or PIN before the payment is processed on-chain.","operationId":"mobilePaymentSubmitIntent","parameters":[{"name":"intentId","in":"path","description":"Payment intent ID","required":true,"schema":{"type":"string","example":"pi_abc123"}}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"properties":{"auth":{"description":"Authentication method","type":"string","example":"biometric","enum":["biometric","pin"]},"shield":{"description":"Enable privacy shield","type":"boolean","example":false}},"type":"object"}}}},"responses":{"200":{"description":"Payment intent submitted","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"intentId":{"type":"string","example":"pi_abc123"},"status":{"type":"string","example":"SUBMITTED"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"404":{"description":"Payment intent not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"INTENT_NOT_FOUND"},"message":{"type":"string","example":"Payment intent not found."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Payment intent cannot be submitted (invalid state)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"PAYMENT_INTENT_ERROR"},"message":{"type":"string","example":"Intent is not in a submittable state."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/payments\/intents\/{intentId}\/cancel":{"post":{"tags":["Mobile Payments"],"summary":"Cancel a payment intent","description":"Cancels a pending payment intent. An optional reason can be provided for auditing purposes.","operationId":"mobilePaymentCancelIntent","parameters":[{"name":"intentId","in":"path","description":"Payment intent ID","required":true,"schema":{"type":"string","example":"pi_abc123"}}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"properties":{"reason":{"description":"Cancellation reason (max 500 chars)","type":"string","example":"Changed my mind","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Payment intent cancelled","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"intentId":{"type":"string","example":"pi_abc123"},"status":{"type":"string","example":"CANCELLED"},"merchant":{"properties":{"displayName":{"type":"string","example":"Coffee Shop"}},"type":"object"},"amount":{"type":"number","example":25.5}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"404":{"description":"Payment intent not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"INTENT_NOT_FOUND"},"message":{"type":"string","example":"Payment intent not found."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Payment intent cannot be cancelled (invalid state)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"PAYMENT_INTENT_ERROR"},"message":{"type":"string","example":"Intent is not in a cancellable state."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/transactions\/{txId}\/receipt":{"post":{"tags":["Mobile Payments"],"summary":"Generate a receipt for a transaction","description":"Generates a digital receipt for a confirmed transaction. Receipts can only be generated for transactions that have been confirmed on-chain.","operationId":"mobilePaymentGenerateReceipt","parameters":[{"name":"txId","in":"path","description":"Transaction ID","required":true,"schema":{"type":"string","example":"tx_abc123"}}],"responses":{"200":{"description":"Receipt generated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"receiptId":{"type":"string","example":"rcpt_abc123"},"merchantName":{"type":"string","example":"Coffee Shop"},"amount":{"type":"string","example":"25.50"},"asset":{"type":"string","example":"USDC"},"dateTime":{"type":"string","format":"date-time"},"networkFee":{"type":"string","example":"0.01 USD"},"sharePayload":{"description":"Public URL of the hosted receipt page","type":"string","example":"https:\/\/app.zelta.app\/receipt\/abc..."},"pdfUrl":{"description":"Public URL of the downloadable receipt PDF (null if generation failed)","type":"string","example":"https:\/\/app.zelta.app\/storage\/receipts\/abc....pdf","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Receipt cannot be generated (transaction not confirmed)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"RECEIPT_UNAVAILABLE"},"message":{"type":"string","example":"Receipt can only be generated for confirmed transactions."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/transactions\/{txId}":{"get":{"tags":["Mobile Payments"],"summary":"Get transaction details","description":"Retrieves the full details of a transaction including on-chain status, merchant info, amount, and fees.","operationId":"mobilePaymentGetTransaction","parameters":[{"name":"txId","in":"path","description":"Transaction ID","required":true,"schema":{"type":"string","example":"tx_abc123"}}],"responses":{"200":{"description":"Transaction details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"transactionId":{"type":"string","example":"tx_abc123"},"status":{"type":"string","example":"CONFIRMED"},"amount":{"type":"number","example":25.5},"asset":{"type":"string","example":"USDC"},"network":{"type":"string","example":"SOLANA"},"hash":{"description":"On-chain transaction hash","type":"string"},"merchant":{"properties":{"displayName":{"type":"string","example":"Coffee Shop"}},"type":"object"},"fee":{"properties":{"amount":{"type":"number","example":0.01},"asset":{"type":"string","example":"USDC"}},"type":"object"},"created_at":{"type":"string","format":"date-time"},"confirmed_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"404":{"description":"Transaction not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"TRANSACTION_NOT_FOUND"},"message":{"type":"string","example":"Transaction not found."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/wallet\/receive":{"get":{"tags":["Mobile Payments"],"summary":"Get a receive address for the authenticated user","description":"Returns a wallet receive address for the specified asset and network. The address can be used to receive payments from external wallets or exchanges.","operationId":"mobilePaymentWalletReceive","parameters":[{"name":"asset","in":"query","description":"Payment asset (USDC or USDT)","required":true,"schema":{"type":"string","example":"USDC","enum":["USDC","USDT"]}},{"name":"network","in":"query","description":"Payment network","required":true,"schema":{"type":"string","example":"SOLANA","enum":["SOLANA","TRON"]}}],"responses":{"200":{"description":"Receive address","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"address":{"type":"string","example":"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"},"network":{"type":"string","example":"SOLANA"},"asset":{"type":"string","example":"USDC"},"qr_uri":{"type":"string","example":"solana:7xKXtg...?spl-token=USDC"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error (invalid asset or network)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"VALIDATION_ERROR"},"message":{"type":"string","example":"The given data was invalid."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v2\/modules":{"get":{"tags":["Module Management"],"summary":"List all modules","description":"Returns a list of all available domain modules with optional status and type filters.","operationId":"moduleIndex","parameters":[{"name":"status","in":"query","description":"Filter by module status","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","description":"Filter by module type","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"meta":{"properties":{"total":{"type":"integer"},"installed":{"type":"integer"},"disabled":{"type":"integer"},"statuses":{"type":"array","items":{"type":"string"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Invalid filter value"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/modules\/{name}":{"get":{"tags":["Module Management"],"summary":"Get module details","description":"Returns detailed information about a single module including manifest and verification status.","operationId":"moduleShow","parameters":[{"name":"name","in":"path","description":"Module name or package identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"module":{"type":"object"},"manifest":{"type":"object","nullable":true},"verification":{"type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Module not found"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/modules\/{name}\/enable":{"post":{"tags":["Module Management"],"summary":"Enable a module","description":"Enables a previously disabled domain module. Requires admin privileges.","operationId":"moduleEnable","parameters":[{"name":"name","in":"path","description":"Module name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Module enabled successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object"},"message":{"type":"string"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Enable failed"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/modules\/{name}\/disable":{"post":{"tags":["Module Management"],"summary":"Disable a module","description":"Disables an active domain module. Core modules cannot be disabled. Requires admin privileges.","operationId":"moduleDisable","parameters":[{"name":"name","in":"path","description":"Module name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Module disabled successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object"},"message":{"type":"string"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Disable failed"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/modules\/health":{"get":{"tags":["Module Management"],"summary":"Get module health summary","description":"Returns an overall health summary across all installed domain modules.","operationId":"moduleHealth","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"healthy":{"type":"boolean"},"modules":{"type":"array","items":{"properties":{"name":{"type":"string"},"healthy":{"type":"boolean"},"passed":{"type":"integer"},"failed":{"type":"integer"},"errors":{"type":"array","items":{"type":"string"}}},"type":"object"}}},"type":"object"},"meta":{"properties":{"total_installed":{"type":"integer"},"healthy":{"type":"integer"},"unhealthy":{"type":"integer"},"checked_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/modules\/{name}\/verify":{"post":{"tags":["Module Management"],"summary":"Verify module health","description":"Runs health verification checks on a specific module. Requires admin privileges.","operationId":"moduleVerify","parameters":[{"name":"name","in":"path","description":"Module name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Module is healthy","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object"},"meta":{"properties":{"summary":{"type":"string"},"checked_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Module not found"},"503":{"description":"Module is unhealthy"}},"security":[{"sanctum":[]}]}},"\/api\/monitoring\/health":{"get":{"tags":["Monitoring"],"summary":"Get application health status","description":"Returns comprehensive health check results","operationId":"getHealthStatus","responses":{"200":{"description":"Health status retrieved successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","enum":["healthy","degraded","unhealthy"]},"healthy":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"},"checks":{"type":"object"},"summary":{"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/monitoring\/ready":{"get":{"tags":["Monitoring"],"summary":"Get application readiness status","description":"Returns whether the application is ready to serve traffic","operationId":"getReadyStatus","responses":{"200":{"description":"Application is ready","content":{"application\/json":{"schema":{"properties":{"ready":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"}},"type":"object"}}}},"503":{"description":"Application not ready"}}}},"\/api\/monitoring\/alive":{"get":{"tags":["Monitoring"],"summary":"Get application liveness status","description":"Simple liveness check for Kubernetes","operationId":"getAliveStatus","responses":{"200":{"description":"Application is alive","content":{"application\/json":{"schema":{"properties":{"alive":{"type":"boolean","example":true},"timestamp":{"type":"string","format":"date-time"}},"type":"object"}}}}}}},"\/api\/monitoring\/metrics":{"get":{"tags":["Monitoring"],"summary":"Get application metrics","description":"Returns current application metrics in JSON format","operationId":"getMetrics","responses":{"200":{"description":"Metrics retrieved successfully","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object"}}}}}},"security":[{"sanctum":[]}]}},"\/api\/monitoring\/prometheus":{"get":{"tags":["Monitoring"],"summary":"Export metrics in Prometheus format","description":"Returns metrics formatted for Prometheus scraping","operationId":"getPrometheusMetrics","responses":{"200":{"description":"Prometheus metrics exported","content":{"text\/plain":{"schema":{"type":"string"}}}}}}},"\/api\/monitoring\/traces":{"get":{"tags":["Monitoring"],"summary":"Get distributed traces","description":"Returns list of distributed traces","operationId":"getTraces","parameters":[{"name":"limit","in":"query","description":"Number of traces to return","required":false,"schema":{"type":"integer","default":100}}],"responses":{"200":{"description":"Traces retrieved successfully","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object"}}}}}},"security":[{"sanctum":[]}]}},"\/api\/monitoring\/trace\/{traceId}":{"get":{"tags":["Monitoring"],"summary":"Get specific trace details","description":"Returns detailed information about a specific trace","operationId":"getTrace","parameters":[{"name":"traceId","in":"path","description":"Trace ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Trace details retrieved","content":{"application\/json":{"schema":{"type":"object"}}}},"404":{"description":"Trace not found"}},"security":[{"sanctum":[]}]}},"\/api\/monitoring\/alerts":{"get":{"tags":["Monitoring"],"summary":"Get active alerts","description":"Returns list of active monitoring alerts","operationId":"getAlerts","parameters":[{"name":"severity","in":"query","description":"Filter by severity","required":false,"schema":{"type":"string","enum":["critical","error","warning","info"]}}],"responses":{"200":{"description":"Alerts retrieved successfully","content":{"application\/json":{"schema":{"type":"array","items":{"type":"object"}}}}}},"security":[{"sanctum":[]}]}},"\/api\/monitoring\/alerts\/{alertId}\/acknowledge":{"put":{"tags":["Monitoring"],"summary":"Acknowledge an alert","description":"Marks an alert as acknowledged","operationId":"acknowledgeAlert","parameters":[{"name":"alertId","in":"path","description":"Alert ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Alert acknowledged","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string"},"alert_id":{"type":"integer"}},"type":"object"}}}},"404":{"description":"Alert not found"}},"security":[{"sanctum":[]}]}},"\/api\/monitoring\/workflow\/start":{"post":{"tags":["Monitoring"],"summary":"Start monitoring workflow","description":"Starts the automated monitoring workflow","operationId":"startMonitoringWorkflow","requestBody":{"required":false,"content":{"application\/json":{"schema":{"properties":{"interval":{"type":"integer","default":60},"max_iterations":{"type":"integer","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Workflow started","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string"},"workflow_id":{"type":"string"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/monitoring\/workflow\/stop":{"post":{"tags":["Monitoring"],"summary":"Stop monitoring workflow","description":"Stops the automated monitoring workflow","operationId":"stopMonitoringWorkflow","responses":{"200":{"description":"Workflow stopped","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string"}},"type":"object"}}}},"404":{"description":"No active workflow found"}},"security":[{"sanctum":[]}]}},"\/api\/multi-sig\/wallets":{"get":{"tags":["Multi-Sig Wallets"],"summary":"List multi-signature wallets","description":"List user's multi-signature wallets.","operationId":"c2aaa785137d00cafb0baf2c20b3ebfa","parameters":[{"name":"chain","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of wallets"}}},"post":{"tags":["Multi-Sig Wallets"],"summary":"Create a multi-signature wallet","description":"Create a new multi-signature wallet.","operationId":"6cd78f695ee28f6fb29fc6fef3a70f93","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name","chain","required_signatures","total_signers"],"properties":{"name":{"type":"string","example":"Corporate Treasury"},"chain":{"type":"string","example":"ethereum"},"required_signatures":{"type":"integer","example":2},"total_signers":{"type":"integer","example":3}},"type":"object"}}}},"responses":{"201":{"description":"Wallet created successfully"},"422":{"description":"Validation error"}}}},"\/api\/multi-sig\/wallets\/{id}":{"get":{"tags":["Multi-Sig Wallets"],"summary":"Get wallet details","description":"Get multi-signature wallet details.","operationId":"7f8878c3d8be751e874f030e5abe4487","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Wallet details"},"404":{"description":"Wallet not found"}}}},"\/api\/multi-sig\/wallets\/{id}\/signers":{"post":{"tags":["Multi-Sig Wallets"],"summary":"Add a signer to wallet","description":"Add a signer to a multi-signature wallet.","operationId":"ca7eecec6419e6d3a0b7e001daa3735f","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["signer_type","public_key"],"properties":{"signer_type":{"type":"string","example":"hardware_ledger"},"public_key":{"type":"string"},"address":{"type":"string"},"hardware_wallet_association_id":{"type":"string","format":"uuid"},"label":{"type":"string"}},"type":"object"}}}},"responses":{"201":{"description":"Signer added successfully"},"404":{"description":"Wallet not found"}}}},"\/api\/multi-sig\/wallets\/{id}\/approval-requests":{"post":{"tags":["Multi-Sig Wallets"],"summary":"Create an approval request","description":"Create an approval request.","operationId":"9a9578edca63f78dc694b72c0ab42c37","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["transaction_data"],"properties":{"transaction_data":{"type":"object"},"request_type":{"type":"string","example":"transaction"}},"type":"object"}}}},"responses":{"201":{"description":"Approval request created"},"404":{"description":"Wallet not found"}}}},"\/api\/multi-sig\/approval-requests\/{id}\/approve":{"post":{"tags":["Multi-Sig Wallets"],"summary":"Submit signature for approval","description":"Submit a signature for an approval request.","operationId":"dd20bd63da61fddbab3eafef215f96fc","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["signature","public_key"],"properties":{"signature":{"type":"string"},"public_key":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Signature submitted"},"404":{"description":"Request not found"}}}},"\/api\/multi-sig\/approval-requests\/{id}\/reject":{"post":{"tags":["Multi-Sig Wallets"],"summary":"Reject an approval request","description":"Reject an approval request.","operationId":"4a5309095f78e255e49580247ae4ece9","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"reason":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Request rejected"},"404":{"description":"Request not found"}}}},"\/api\/multi-sig\/approval-requests\/{id}\/broadcast":{"post":{"tags":["Multi-Sig Wallets"],"summary":"Broadcast the signed transaction","description":"Broadcast a fully-signed transaction.","operationId":"2f7eee04d3fcf099534c75f7fbdd2d09","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Transaction broadcast"},"404":{"description":"Request not found"}}}},"\/api\/multi-sig\/supported":{"get":{"tags":["Multi-Sig Wallets"],"summary":"Get supported multi-sig configuration","description":"Get supported configuration.","operationId":"c6059f84750a6c3a5b9210c54dd93e67","responses":{"200":{"description":"Supported configuration"}}}},"\/api\/multi-sig\/pending-approvals":{"get":{"tags":["Multi-Sig Wallets"],"summary":"Get pending approval requests","description":"Get pending approval requests for current user.","operationId":"cad95abe6f1a64f4c8e0fa191d58a6db","responses":{"200":{"description":"List of pending approvals"}}}},"\/api\/webhooks\/ondato\/identity-verification":{"post":{"tags":["Ondato Webhooks"],"summary":"Receive Ondato identity verification webhook","description":"Endpoint for receiving identity verification webhook notifications from Ondato","operationId":"ondatoIdentityVerificationWebhook","requestBody":{"description":"Webhook payload from Ondato","required":true,"content":{"application\/json":{"schema":{"properties":{"id":{"type":"string","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"},"applicationId":{"type":"string","example":"app-123"},"identityVerificationId":{"type":"string","example":"idv-456"},"status":{"type":"string","example":"PROCESSED"}},"type":"object"}}}},"responses":{"200":{"description":"Webhook received","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"received"}},"type":"object"}}}},"400":{"description":"Invalid payload"},"401":{"description":"Invalid signature"}}}},"\/api\/webhooks\/ondato\/identification":{"post":{"tags":["Ondato Webhooks"],"summary":"Receive Ondato identification webhook","description":"Endpoint for receiving identification result webhook notifications from Ondato","operationId":"ondatoIdentificationWebhook","requestBody":{"description":"Webhook payload from Ondato","required":true,"content":{"application\/json":{"schema":{"properties":{"id":{"type":"string","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"},"identityVerificationId":{"type":"string","example":"idv-456"},"status":{"type":"string","example":"PROCESSED"}},"type":"object"}}}},"responses":{"200":{"description":"Webhook received","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"received"}},"type":"object"}}}},"400":{"description":"Invalid payload"},"401":{"description":"Invalid signature"}}}},"\/api\/partner\/v1\/billing\/invoices":{"get":{"tags":["Partner BaaS"],"summary":"List partner invoices","description":"Returns up to 50 most recent invoices for the authenticated partner, ordered by creation date descending.","operationId":"partnerListInvoices","responses":{"200":{"description":"List of invoices","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"id":{"type":"integer","example":1},"invoice_number":{"type":"string","example":"INV-2025-0001"},"amount":{"type":"number","example":299},"currency":{"type":"string","example":"USD"},"status":{"type":"string","example":"paid"},"period_start":{"type":"string","format":"date"},"period_end":{"type":"string","format":"date"},"created_at":{"type":"string","format":"date-time"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/billing\/invoices\/{id}":{"get":{"tags":["Partner BaaS"],"summary":"Get a specific invoice","description":"Retrieves the details of a single invoice by its ID for the authenticated partner.","operationId":"partnerGetInvoice","parameters":[{"name":"id","in":"path","description":"Invoice ID","required":true,"schema":{"type":"integer","example":1}}],"responses":{"200":{"description":"Invoice details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"id":{"type":"integer","example":1},"invoice_number":{"type":"string","example":"INV-2025-0001"},"amount":{"type":"number","example":299},"currency":{"type":"string","example":"USD"},"status":{"type":"string","example":"paid"},"period_start":{"type":"string","format":"date"},"period_end":{"type":"string","format":"date"},"created_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"404":{"description":"Invoice not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Invoice not found"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/billing\/outstanding":{"get":{"tags":["Partner BaaS"],"summary":"Get outstanding balance","description":"Returns the total outstanding (unpaid) balance for the authenticated partner in USD.","operationId":"partnerGetOutstandingBalance","responses":{"200":{"description":"Outstanding balance","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"outstanding_balance_usd":{"type":"number","example":599},"currency":{"type":"string","example":"USD"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/billing\/breakdown":{"get":{"tags":["Partner BaaS"],"summary":"Get current period billing breakdown preview","description":"Returns a detailed billing breakdown for the current month-to-date period, including base fees, overage charges, and per-endpoint costs.","operationId":"partnerGetBillingBreakdown","responses":{"200":{"description":"Billing breakdown","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"description":"Detailed billing breakdown with line items and totals","type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/billing\/invoices\/{id}\/pay":{"post":{"tags":["Partner BaaS"],"summary":"Pay an invoice via Visa CLI","description":"Collects payment for a pending or overdue invoice using the Visa CLI payment gateway.","operationId":"partnerPayInvoice","parameters":[{"name":"id","in":"path","description":"Invoice ID","required":true,"schema":{"type":"integer","example":1}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"card_id":{"description":"Optional enrolled card ID","type":"string","example":null}},"type":"object"}}}},"responses":{"200":{"description":"Payment successful","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"payment_reference":{"type":"string"},"status":{"type":"string","example":"completed"},"amount_cents":{"type":"integer","example":29900}},"type":"object"}},"type":"object"}}}},"404":{"description":"Invoice not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Invoice not found"}},"type":"object"}}}},"422":{"description":"Invoice cannot be paid or payment failed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Invoice cannot be paid"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/profile":{"get":{"tags":["Partner BaaS"],"summary":"Get partner profile and tier information","description":"Returns the authenticated partner's profile including institution name, current tier, status, and rate limits.","operationId":"partnerGetProfile","responses":{"200":{"description":"Partner profile","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"id":{"type":"integer","example":1},"partner_code":{"type":"string","example":"PARTNER_ABC"},"institution_name":{"type":"string","example":"Acme Bank"},"tier":{"type":"string","example":"growth"},"tier_label":{"type":"string","example":"Growth"},"status":{"type":"string","example":"active"},"sandbox_enabled":{"type":"boolean","example":true},"production_enabled":{"type":"boolean","example":false},"rate_limit":{"type":"integer","example":1000}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/usage":{"get":{"tags":["Partner BaaS"],"summary":"Get current period usage summary","description":"Returns API usage summary for the current billing period (month-to-date), including call counts by endpoint and usage limit status.","operationId":"partnerGetUsage","responses":{"200":{"description":"Usage summary","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"period_start":{"type":"string","format":"date","example":"2025-01-01"},"period_end":{"type":"string","format":"date","example":"2025-01-15"},"summary":{"description":"Usage breakdown by endpoint and total","type":"object"},"limit":{"description":"Usage limit status and remaining quota","type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/usage\/history":{"get":{"tags":["Partner BaaS"],"summary":"Get historical usage records","description":"Returns historical API usage data for a custom date range. Defaults to the last 30 days if no dates are provided.","operationId":"partnerGetUsageHistory","parameters":[{"name":"start_date","in":"query","description":"Start date for usage history (defaults to 1 month ago)","required":false,"schema":{"type":"string","format":"date","example":"2025-01-01"}},{"name":"end_date","in":"query","description":"End date for usage history (defaults to today)","required":false,"schema":{"type":"string","format":"date","example":"2025-01-31"}}],"responses":{"200":{"description":"Historical usage data","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"description":"Usage summary for the requested period","type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/tier":{"get":{"tags":["Partner BaaS"],"summary":"Get current tier details","description":"Returns detailed information about the partner's current tier including pricing, API call limits, available features, and access levels.","operationId":"partnerGetTier","responses":{"200":{"description":"Tier details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"tier":{"type":"string","example":"growth"},"label":{"type":"string","example":"Growth"},"monthly_price":{"type":"number","example":299},"api_call_limit":{"type":"integer","example":100000},"features":{"type":"array","items":{"type":"string"},"example":["core_banking","payments","compliance"]},"has_sdk":{"type":"boolean","example":true},"has_widgets":{"type":"boolean","example":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/tier\/comparison":{"get":{"tags":["Partner BaaS"],"summary":"Compare all available tiers","description":"Returns a comparison of all available partnership tiers, highlighting the partner's current tier and the differences in features, pricing, and limits.","operationId":"partnerGetTierComparison","responses":{"200":{"description":"Tier comparison","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"description":"Tier comparison matrix with features, pricing, and limits per tier","type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/branding":{"get":{"tags":["Partner BaaS"],"summary":"Get current branding configuration","description":"Returns the partner's current branding configuration used for white-label widgets, including colors, logos, and company information.","operationId":"partnerGetBranding","responses":{"200":{"description":"Branding configuration","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"primary_color":{"type":"string","example":"#1E40AF"},"secondary_color":{"type":"string","example":"#3B82F6"},"accent_color":{"type":"string","example":"#F59E0B"},"logo_url":{"type":"string","example":"https:\/\/example.com\/logo.png","nullable":true},"company_name":{"type":"string","example":"Acme Bank"},"support_email":{"type":"string","example":"support@acmebank.com"}},"type":"object","nullable":true}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]},"put":{"tags":["Partner BaaS"],"summary":"Update branding configuration","description":"Updates the partner's branding configuration for white-label widgets. All fields are optional; only provided fields will be updated.","operationId":"partnerUpdateBranding","requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"primary_color":{"description":"Primary brand color (hex, max 7 chars)","type":"string","example":"#1E40AF"},"secondary_color":{"description":"Secondary brand color","type":"string","example":"#3B82F6"},"accent_color":{"description":"Accent color","type":"string","example":"#F59E0B"},"text_color":{"description":"Text color","type":"string","example":"#111827"},"background_color":{"description":"Background color","type":"string","example":"#FFFFFF"},"logo_url":{"description":"Logo URL (max 500 chars)","type":"string","example":"https:\/\/example.com\/logo.png","nullable":true},"company_name":{"description":"Company display name (max 255 chars)","type":"string","example":"Acme Bank"},"tagline":{"description":"Company tagline (max 500 chars)","type":"string","example":"Banking made simple","nullable":true},"support_email":{"description":"Support email","type":"string","format":"email","example":"support@acmebank.com"},"privacy_policy_url":{"description":"Privacy policy URL","type":"string","example":"https:\/\/example.com\/privacy","nullable":true},"terms_of_service_url":{"description":"Terms of service URL","type":"string","example":"https:\/\/example.com\/terms","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Branding updated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"primary_color":{"type":"string","example":"#1E40AF"},"secondary_color":{"type":"string","example":"#3B82F6"},"company_name":{"type":"string","example":"Acme Bank"}},"type":"object"},"message":{"type":"string","example":"Branding updated successfully"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"VALIDATION_ERROR"},"message":{"type":"string","example":"The given data was invalid."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/marketplace":{"get":{"tags":["Partner BaaS"],"summary":"List available integrations","description":"Returns a catalog of all available third-party integrations that partners can enable, organized by category (KYC, payments, analytics, etc.).","operationId":"partnerMarketplaceList","responses":{"200":{"description":"Available integrations","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"category":{"type":"string","example":"kyc"},"providers":{"type":"array","items":{"properties":{"name":{"type":"string","example":"sumsub"},"label":{"type":"string","example":"SumSub"},"description":{"type":"string"}},"type":"object"}}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/marketplace\/integrations":{"get":{"tags":["Partner BaaS"],"summary":"Get partner's active integrations","description":"Returns a list of integrations currently enabled for the authenticated partner, including their configuration and status.","operationId":"partnerMarketplaceIntegrations","responses":{"200":{"description":"Active integrations","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"id":{"type":"integer","example":1},"category":{"type":"string","example":"kyc"},"provider":{"type":"string","example":"sumsub"},"status":{"type":"string","example":"active"},"enabled_at":{"type":"string","format":"date-time"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]},"post":{"tags":["Partner BaaS"],"summary":"Enable an integration","description":"Enables a third-party integration for the partner. Requires specifying the category and provider, with optional configuration parameters.","operationId":"partnerMarketplaceEnable","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["category","provider"],"properties":{"category":{"description":"Integration category","type":"string","example":"kyc"},"provider":{"description":"Integration provider","type":"string","example":"sumsub"},"config":{"description":"Optional provider-specific configuration","type":"object","example":{"api_key":"key_123","webhook_url":"https:\/\/example.com\/webhook"}}},"type":"object"}}}},"responses":{"201":{"description":"Integration enabled","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"success":{"type":"boolean","example":true},"integration_id":{"type":"integer","example":1},"category":{"type":"string","example":"kyc"},"provider":{"type":"string","example":"sumsub"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Integration cannot be enabled (invalid provider or tier restriction)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"data":{"properties":{"success":{"type":"boolean","example":false},"error":{"type":"string","example":"Provider not available for your tier"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/marketplace\/integrations\/{id}":{"delete":{"tags":["Partner BaaS"],"summary":"Disable an integration","description":"Disables a previously enabled integration by its ID. The integration's configuration is preserved for potential re-enablement.","operationId":"partnerMarketplaceDisable","parameters":[{"name":"id","in":"path","description":"Integration ID","required":true,"schema":{"type":"integer","example":1}}],"responses":{"200":{"description":"Integration disabled","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Integration disabled successfully"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"404":{"description":"Integration not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Integration not found"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/marketplace\/integrations\/{id}\/test":{"post":{"tags":["Partner BaaS"],"summary":"Test an integration connection","description":"Performs a connectivity test against the specified integration to verify that API keys and configuration are valid.","operationId":"partnerMarketplaceTestConnection","parameters":[{"name":"id","in":"path","description":"Integration ID","required":true,"schema":{"type":"integer","example":1}}],"responses":{"200":{"description":"Connection test result","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"success":{"type":"boolean","example":true},"latency_ms":{"type":"integer","example":120},"message":{"type":"string","example":"Connection successful"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"404":{"description":"Integration not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"data":{"properties":{"success":{"type":"boolean","example":false},"error":{"type":"string","example":"Integration not found"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/marketplace\/health":{"get":{"tags":["Partner BaaS"],"summary":"Get integration health overview","description":"Returns a health status overview of all enabled integrations, including uptime, error rates, and last successful connection timestamps.","operationId":"partnerMarketplaceHealth","responses":{"200":{"description":"Integration health overview","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"total_integrations":{"type":"integer","example":3},"healthy":{"type":"integer","example":2},"degraded":{"type":"integer","example":1},"down":{"type":"integer","example":0},"integrations":{"type":"array","items":{"properties":{"id":{"type":"integer","example":1},"provider":{"type":"string","example":"sumsub"},"status":{"type":"string","example":"healthy","enum":["healthy","degraded","down"]},"last_check":{"type":"string","format":"date-time"}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/sdk\/languages":{"get":{"tags":["Partner BaaS"],"summary":"Get available SDK languages","description":"Returns a list of programming languages for which SDKs can be generated.","operationId":"partnerSdkLanguages","responses":{"200":{"description":"Available SDK languages","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"language":{"type":"string","example":"typescript"},"label":{"type":"string","example":"TypeScript"},"version":{"type":"string","example":"1.0.0"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/sdk\/generate":{"post":{"tags":["Partner BaaS"],"summary":"Generate an SDK for a specific language","description":"Triggers SDK generation for the specified programming language. The SDK is customized with the partner's API keys and branding.","operationId":"partnerSdkGenerate","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["language"],"properties":{"language":{"description":"Programming language for SDK generation","type":"string","example":"typescript"}},"type":"object"}}}},"responses":{"200":{"description":"SDK generated successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"success":{"type":"boolean","example":true},"language":{"type":"string","example":"typescript"},"download_url":{"type":"string","example":"https:\/\/example.com\/sdk\/download\/abc123"},"version":{"type":"string","example":"1.0.0"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"422":{"description":"SDK generation failed (unsupported language or tier restriction)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"data":{"properties":{"success":{"type":"boolean","example":false},"error":{"type":"string","example":"Unsupported language"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/sdk\/{language}":{"get":{"tags":["Partner BaaS"],"summary":"Get SDK status for a specific language","description":"Returns the current status of the SDK for the specified language, including version, build status, and download URL if available.","operationId":"partnerSdkStatus","parameters":[{"name":"language","in":"path","description":"SDK language identifier","required":true,"schema":{"type":"string","example":"typescript"}}],"responses":{"200":{"description":"SDK status","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"language":{"type":"string","example":"typescript"},"status":{"type":"string","example":"ready"},"version":{"type":"string","example":"1.0.0"},"download_url":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/sdk\/openapi-spec":{"get":{"tags":["Partner BaaS"],"summary":"Get the OpenAPI specification","description":"Returns the full OpenAPI (Swagger) specification as JSON. This spec can be used with code generators or API documentation tools.","operationId":"partnerSdkOpenapiSpec","responses":{"200":{"description":"OpenAPI specification","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"description":"Full OpenAPI 3.0 specification","type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"404":{"description":"OpenAPI spec not available","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"OpenAPI spec not available"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/webhooks\/events":{"get":{"tags":["Partner BaaS"],"summary":"List available webhook test event types","description":"Returns all event types that can be used for webhook testing.","operationId":"partnerWebhookEvents","responses":{"200":{"description":"Available webhook event types","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"string","example":"payment.completed"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/webhooks\/test\/{eventType}":{"post":{"tags":["Partner BaaS"],"summary":"Send a test webhook for a given event type","description":"Generates a test webhook payload for the specified event type and optionally sends it to the provided URL.","operationId":"partnerWebhookTest","parameters":[{"name":"eventType","in":"path","description":"Webhook event type","required":true,"schema":{"type":"string","example":"payment.completed"}}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"properties":{"target_url":{"description":"URL to send the test webhook to","type":"string","example":"https:\/\/example.com\/webhook","nullable":true},"secret":{"description":"HMAC secret for signature generation","type":"string","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Test webhook payload generated (and optionally sent)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"payload":{"description":"Generated test payload","type":"object"},"sent":{"type":"boolean","example":true,"nullable":true},"status_code":{"type":"integer","example":200,"nullable":true}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/webhooks\/replay\/{deliveryId}":{"post":{"tags":["Partner BaaS"],"summary":"Replay a webhook delivery","description":"Replays a past webhook delivery to the specified target URL.","operationId":"partnerWebhookReplay","parameters":[{"name":"deliveryId","in":"path","description":"Webhook delivery ID","required":true,"schema":{"type":"string","example":"whk_test_abc123"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["target_url","payload"],"properties":{"target_url":{"type":"string","example":"https:\/\/example.com\/webhook"},"payload":{"description":"JSON payload to replay","type":"string"},"secret":{"description":"HMAC secret for signature","type":"string","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Webhook replayed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"replayed":{"type":"boolean","example":true},"delivery_id":{"type":"string","example":"whk_test_abc123"},"status_code":{"type":"integer","example":200,"nullable":true},"error":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/widgets":{"get":{"tags":["Partner BaaS"],"summary":"Get available widget types","description":"Returns a list of all embeddable widget types available for the partner's tier, including their descriptions and configuration options.","operationId":"partnerListWidgets","responses":{"200":{"description":"Available widget types","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"type":{"type":"string","example":"exchange"},"label":{"type":"string","example":"Exchange Widget"},"description":{"type":"string","example":"Embeddable exchange trading widget"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/widgets\/{type}\/embed":{"post":{"tags":["Partner BaaS"],"summary":"Generate embed code for a widget","description":"Generates HTML\/JavaScript embed code for the specified widget type, customized with the partner's branding and optional layout parameters.","operationId":"partnerGenerateWidgetEmbed","parameters":[{"name":"type","in":"path","description":"Widget type identifier","required":true,"schema":{"type":"string","example":"exchange"}}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"properties":{"container_id":{"description":"HTML container element ID (max 100 chars)","type":"string","example":"widget-container"},"width":{"description":"Widget width (max 20 chars)","type":"string","example":"400px"},"height":{"description":"Widget height (max 20 chars)","type":"string","example":"600px"}},"type":"object"}}}},"responses":{"200":{"description":"Embed code generated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"success":{"type":"boolean","example":true},"embed_code":{"description":"HTML\/JS embed snippet","type":"string"},"type":{"type":"string","example":"exchange"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Invalid widget type or tier restriction","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"data":{"properties":{"success":{"type":"boolean","example":false},"error":{"type":"string","example":"Widget type not available for your tier"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/partner\/v1\/widgets\/{type}\/preview":{"get":{"tags":["Partner BaaS"],"summary":"Preview a widget with branding","description":"Returns a preview of the widget with the partner's current branding applied. Useful for testing branding changes before deploying to production.","operationId":"partnerPreviewWidget","parameters":[{"name":"type","in":"path","description":"Widget type identifier","required":true,"schema":{"type":"string","example":"exchange"}}],"responses":{"200":{"description":"Widget preview","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"success":{"type":"boolean","example":true},"preview_url":{"type":"string","example":"https:\/\/example.com\/widget\/preview\/abc123"},"type":{"type":"string","example":"exchange"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNAUTHORIZED"},"message":{"type":"string","example":"Unauthenticated."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Invalid widget type or tier restriction","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"data":{"properties":{"success":{"type":"boolean","example":false},"error":{"type":"string","example":"Widget type not available for your tier"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v2\/plugins":{"get":{"tags":["Plugin Marketplace"],"summary":"List all installed plugins","description":"Returns a list of all installed plugins with status","operationId":"pluginMarketplaceIndex","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/plugins\/{id}":{"get":{"tags":["Plugin Marketplace"],"summary":"Show a specific plugin","description":"Returns detailed information about a specific plugin","operationId":"pluginMarketplaceShow","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]},"delete":{"tags":["Plugin Marketplace"],"summary":"Remove a plugin","description":"Removes a plugin from the system","operationId":"pluginMarketplaceDestroy","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/plugins\/{id}\/enable":{"post":{"tags":["Plugin Marketplace"],"summary":"Enable a plugin","description":"Enables a disabled plugin","operationId":"pluginMarketplaceEnable","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/plugins\/{id}\/disable":{"post":{"tags":["Plugin Marketplace"],"summary":"Disable a plugin","description":"Disables an active plugin","operationId":"pluginMarketplaceDisable","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/plugins\/{id}\/scan":{"post":{"tags":["Plugin Marketplace"],"summary":"Scan a plugin for security issues","description":"Runs security scanner on a specific plugin","operationId":"pluginMarketplaceScan","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/plugins\/discover":{"post":{"tags":["Plugin Marketplace"],"summary":"Discover new plugins","description":"Discovers new plugins from the filesystem","operationId":"pluginMarketplaceDiscover","responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/polls":{"get":{"tags":["Governance - Polls"],"summary":"List all polls","description":"Retrieve a paginated list of polls with optional filtering","operationId":"6e193446b08121fa820e77c1a32e6c5d","parameters":[{"name":"status","in":"query","description":"Filter by poll status","required":false,"schema":{"type":"string","enum":["draft","active","completed","cancelled"]}},{"name":"type","in":"query","description":"Filter by poll type","required":false,"schema":{"type":"string","enum":["single_choice","multiple_choice","weighted_choice","yes_no","ranked_choice"]}},{"name":"per_page","in":"query","description":"Number of polls per page","required":false,"schema":{"type":"integer","default":15,"maximum":100,"minimum":1}}],"responses":{"200":{"description":"List of polls","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Poll"}},"meta":{"type":"object"},"links":{"type":"object"}},"type":"object"}}}}}},"post":{"tags":["Governance - Polls"],"summary":"Create a new poll","description":"Create a new governance poll","operationId":"cfe7460dbf9e8b80cc0122d588147993","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["title","type","options","start_date","end_date"],"properties":{"title":{"type":"string","example":"Should we add support for Japanese Yen?"},"description":{"type":"string","example":"Proposal to add JPY as supported currency"},"type":{"type":"string","enum":["single_choice","multiple_choice","weighted_choice","yes_no","ranked_choice"]},"options":{"type":"array","items":{"properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"}},"type":"object"}},"start_date":{"type":"string","format":"date-time"},"end_date":{"type":"string","format":"date-time"},"required_participation":{"type":"integer","example":30},"voting_power_strategy":{"type":"string","enum":["one_user_one_vote","asset_weighted_vote"]},"execution_workflow":{"type":"string","example":"AddAssetWorkflow"}},"type":"object"}}}},"responses":{"201":{"description":"Poll created successfully","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Poll"},"message":{"type":"string"}},"type":"object"}}}},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/polls\/active":{"get":{"tags":["Governance - Polls"],"summary":"Get active polls","description":"Retrieve all currently active polls that are available for voting","operationId":"f13be49b1a672f49c8513b45c4d9fe46","responses":{"200":{"description":"List of active polls","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Poll"}}},"type":"object"}}}}}}},"\/api\/polls\/{uuid}":{"get":{"tags":["Governance - Polls"],"summary":"Get poll details","description":"Retrieve detailed information about a specific poll","operationId":"4a5d22fa28a78c7c00336312b7e412d6","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Poll details","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Poll"}},"type":"object"}}}},"404":{"description":"Poll not found"}}}},"\/api\/polls\/{uuid}\/activate":{"post":{"tags":["Governance - Polls"],"summary":"Activate a poll","description":"Activate a draft poll to make it available for voting","operationId":"1f3250511c8a2af8828834d02eda9f57","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Poll activated successfully","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Poll"},"message":{"type":"string"}},"type":"object"}}}},"400":{"description":"Poll cannot be activated"},"404":{"description":"Poll not found"}},"security":[{"sanctum":[]}]}},"\/api\/polls\/{uuid}\/vote":{"post":{"tags":["Governance - Polls"],"summary":"Cast a vote","description":"Cast a vote in an active poll","operationId":"2efbbf8861a1235c1015ed44b7d9b056","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["selected_options"],"properties":{"selected_options":{"type":"array","items":{"type":"string"}}},"type":"object"}}}},"responses":{"201":{"description":"Vote cast successfully","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Vote"},"message":{"type":"string"}},"type":"object"}}}},"400":{"description":"Cannot vote in this poll"},"404":{"description":"Poll not found"}},"security":[{"sanctum":[]}]}},"\/api\/polls\/{uuid}\/results":{"get":{"tags":["Governance - Polls"],"summary":"Get poll results","description":"Retrieve current results for a poll","operationId":"e4386a648a2adc9a8b8e2c77e409ea96","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Poll results","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/PollResult"}},"type":"object"}}}},"404":{"description":"Poll not found"}}}},"\/api\/polls\/{uuid}\/voting-power":{"get":{"tags":["Governance - Polls"],"summary":"Get user's voting power","description":"Check the authenticated user's voting power for a specific poll","operationId":"5a581e2bc5f798877c24ec9c8c8d8ed8","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"User's voting power","content":{"application\/json":{"schema":{"properties":{"voting_power":{"type":"integer"},"can_vote":{"type":"boolean"},"has_voted":{"type":"boolean"},"strategy":{"type":"string"}},"type":"object"}}}},"404":{"description":"Poll not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/delegated-proof":{"post":{"tags":["Delegated Proofs"],"summary":"Request delegated proof generation","description":"Submit a proof generation request to be processed server-side","operationId":"3142278fd7e5f313445fc795f7a86b95","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["proof_type","network","public_inputs","encrypted_private_inputs"],"properties":{"proof_type":{"type":"string","enum":["shield_1_1","unshield_2_1","transfer_2_2","proof_of_innocence"]},"network":{"type":"string","enum":["polygon","base","arbitrum"]},"public_inputs":{"description":"Public inputs for the proof","type":"object"},"encrypted_private_inputs":{"description":"Encrypted private inputs","type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Proof job created","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"job_id":{"type":"string","format":"uuid"},"status":{"type":"string","example":"queued"},"estimated_seconds":{"type":"integer","example":30}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request"},"429":{"description":"Too many pending jobs"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/delegated-proof\/{jobId}":{"get":{"tags":["Delegated Proofs"],"summary":"Get proof job status","description":"Check the status of a delegated proof generation job","operationId":"0293ed5d05dafe6a4a5e98dfc17d3647","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Proof job status","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"id":{"type":"string","format":"uuid"},"proof_type":{"type":"string"},"network":{"type":"string"},"status":{"type":"string","enum":["queued","proving","completed","failed"]},"progress":{"type":"integer","example":50},"proof":{"type":"string","nullable":true},"error":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"404":{"description":"Job not found"}},"security":[{"sanctum":[]}]},"delete":{"tags":["Delegated Proofs"],"summary":"Cancel proof job","description":"Cancel a pending or in-progress proof job","operationId":"f88a47b7fa22dfbac47cf60ad1cb128a","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Job cancelled","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Proof job cancelled"}},"type":"object"}}}},"400":{"description":"Cannot cancel job"},"404":{"description":"Job not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/delegated-proofs":{"get":{"tags":["Delegated Proofs"],"summary":"List proof jobs","description":"List all delegated proof jobs for the authenticated user","operationId":"cb05dfa7bcb20b577b3c64c49ffaa0f0","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","proving","completed","failed"]}}],"responses":{"200":{"description":"List of proof jobs","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/delegated-proof-types":{"get":{"tags":["Delegated Proofs"],"summary":"Get supported proof types","description":"Get list of supported proof types and networks for delegated proving","operationId":"a26b1766c75108dc97a9b4ea42ddb332","responses":{"200":{"description":"Supported proof types","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"proof_types":{"type":"object"},"networks":{"type":"array","items":{"type":"string"}}},"type":"object"}},"type":"object"}}}}}}},"\/api\/v1\/privacy\/merkle-root":{"get":{"tags":["Privacy"],"summary":"Get the current Merkle root for a privacy pool","description":"Get the current Merkle root for a network.","operationId":"getMerkleRoot","parameters":[{"name":"network","in":"query","description":"RAILGUN-supported network. GET \/networks is the runtime source of truth; RAILGUN does NOT support Base.","required":true,"schema":{"type":"string","enum":["ethereum","polygon","arbitrum","bsc"]}}],"responses":{"200":{"description":"Current Merkle root","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"root":{"type":"string","example":"0x1234..."},"network":{"type":"string","example":"polygon"},"leaf_count":{"type":"integer","example":1000},"tree_depth":{"type":"integer","example":32},"block_number":{"type":"integer","example":55000000},"synced_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid network"},"401":{"description":"Unauthenticated"},"503":{"description":"Privacy pool not available"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/merkle-path":{"post":{"tags":["Privacy"],"summary":"Get Merkle proof path for a commitment","description":"Get the Merkle proof path for a commitment.","operationId":"getMerklePath","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["commitment","network"],"properties":{"commitment":{"description":"32-byte hex commitment with 0x prefix","type":"string"},"network":{"type":"string","enum":["ethereum","polygon","arbitrum","bsc"]}},"type":"object"}}}},"responses":{"200":{"description":"Merkle proof path","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"commitment":{"type":"string"},"root":{"type":"string"},"network":{"type":"string"},"leaf_index":{"type":"integer"},"siblings":{"type":"array","items":{"type":"string"}},"path_indices":{"type":"array","items":{"type":"integer"}},"proof_depth":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid parameters"},"401":{"description":"Unauthenticated"},"404":{"description":"Commitment not found in tree"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/verify-commitment":{"post":{"tags":["Privacy"],"summary":"Verify a commitment exists in the tree","description":"Verify a commitment against a Merkle proof.","operationId":"verifyCommitment","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["commitment","network","siblings","path_indices"],"properties":{"commitment":{"type":"string"},"network":{"type":"string"},"root":{"type":"string"},"leaf_index":{"type":"integer"},"siblings":{"type":"array","items":{"type":"string"}},"path_indices":{"type":"array","items":{"type":"integer"}}},"type":"object"}}}},"responses":{"200":{"description":"Verification result","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"valid":{"type":"boolean"},"commitment":{"type":"string"},"network":{"type":"string"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid parameters"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/networks":{"get":{"tags":["Privacy"],"summary":"Get supported privacy pool networks","description":"Get supported networks.","operationId":"getPrivacyNetworks","responses":{"200":{"description":"Supported networks","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"networks":{"type":"array","items":{"type":"string"}},"tree_depth":{"type":"integer"},"provider":{"type":"string"}},"type":"object"}},"type":"object"}}}}}}},"\/api\/v1\/privacy\/sync":{"post":{"tags":["Privacy"],"summary":"Trigger a Merkle tree sync from the blockchain","description":"Trigger a Merkle tree sync.","operationId":"syncMerkleTree","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["network"],"properties":{"network":{"type":"string","enum":["ethereum","polygon","arbitrum","bsc"]}},"type":"object"}}}},"responses":{"200":{"description":"Sync completed","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"root":{"type":"string"},"network":{"type":"string"},"synced_at":{"type":"string","format":"date-time"}},"type":"object"},"message":{"type":"string"}},"type":"object"}}}},"400":{"description":"Invalid network"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/srs-manifest":{"get":{"tags":["Privacy"],"summary":"Get SRS (Structured Reference String) manifest for ZK circuits","description":"Returns the manifest of SRS files required for mobile ZK proof generation. Mobile clients use this to download the required cryptographic parameters.","operationId":"getSrsManifest","responses":{"200":{"description":"SRS manifest","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"version":{"type":"string","example":"1.0.0"},"cdn_base_url":{"type":"string","example":"https:\/\/cdn.finaegis.com\/srs"},"total_size":{"type":"integer","example":47000000},"required_size":{"type":"integer","example":27000000},"required_count":{"type":"integer","example":2},"total_count":{"type":"integer","example":3},"circuits":{"type":"array","items":{"properties":{"name":{"type":"string","example":"shield_1_1"},"version":{"type":"string","example":"1.0.0"},"size":{"type":"integer","example":15000000},"size_human":{"type":"string","example":"14.31 MB"},"required":{"type":"boolean","example":true},"download_url":{"type":"string","example":"https:\/\/cdn.finaegis.com\/srs\/1.0.0\/shield_1_1.srs"},"checksum":{"type":"string","example":"abc123..."},"checksum_algorithm":{"type":"string","example":"sha256"}},"type":"object"}}},"type":"object"}},"type":"object"}}}}}}},"\/api\/v1\/privacy\/srs-downloaded":{"post":{"tags":["Privacy"],"summary":"Track SRS file download completion","description":"Allows mobile clients to report successful SRS downloads for analytics and capability tracking.","operationId":"trackSrsDownload","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["circuits"],"properties":{"circuits":{"description":"Names of the circuits that were downloaded","type":"array","items":{"type":"string","example":"shield_1_1"}},"device_info":{"description":"Optional device information for analytics","type":"string","example":"iPhone 14 Pro \/ iOS 17.2"}},"type":"object"}}}},"responses":{"200":{"description":"Download tracked successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"tracked":{"type":"boolean","example":true},"circuits":{"type":"array","items":{"type":"string"}},"srs_version":{"type":"string","example":"1.0.0"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid circuits"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/pool-stats":{"get":{"tags":["Privacy"],"summary":"Get privacy pool statistics","description":"Returns aggregate statistics about the privacy pool including participant count and anonymity strength.","operationId":"getPrivacyPoolStats","responses":{"200":{"description":"Pool statistics","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"totalPoolSize":{"type":"number","example":67630},"poolSizeCurrency":{"type":"string","example":"USD"},"participantCount":{"type":"integer","example":10},"privacyStrength":{"type":"string","example":"weak"},"lastUpdated":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}}}}},"\/api\/v1\/privacy\/balances":{"get":{"tags":["Privacy"],"summary":"Get shielded balances per token","description":"Get shielded balances per token.","operationId":"getShieldedBalances","responses":{"200":{"description":"Shielded balances","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"token":{"properties":{"symbol":{"type":"string","example":"USDC"},"name":{"type":"string","example":"USD Coin"},"address":{"type":"string","example":"0x..."},"decimals":{"type":"integer","example":6},"chain_id":{"type":"integer","example":137},"is_stablecoin":{"type":"boolean","example":true}},"type":"object"},"balance":{"type":"string","example":"0.00"},"network":{"type":"string","example":"polygon"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/total-balance":{"get":{"tags":["Privacy"],"summary":"Get total shielded balance in USD","description":"Get total shielded balance aggregated across tokens.","operationId":"getTotalShieldedBalance","responses":{"200":{"description":"Total shielded balance","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"total_balance":{"type":"string","example":"0.00"},"currency":{"type":"string","example":"USD"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/transactions":{"get":{"tags":["Privacy"],"summary":"Get privacy transaction history","description":"Get privacy transactions for the authenticated user.","operationId":"getPrivacyTransactions","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"Privacy transactions","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/shield":{"post":{"tags":["Privacy"],"summary":"Shield tokens into the privacy pool","description":"Shield tokens (create shielded notes).","operationId":"shieldTokens","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["amount","token","network"],"properties":{"amount":{"type":"string","example":"100.00"},"token":{"type":"string","example":"USDC"},"network":{"type":"string","example":"polygon"},"encrypted_inputs":{"type":"string"}},"type":"object"}}}},"responses":{"201":{"description":"Shield operation initiated"},"401":{"description":"Unauthenticated"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/unshield":{"post":{"tags":["Privacy"],"summary":"Unshield tokens from the privacy pool","description":"Unshield tokens (withdraw from privacy pool).","operationId":"unshieldTokens","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["amount","token","network","recipient"],"properties":{"amount":{"type":"string","example":"50.00"},"token":{"type":"string","example":"USDC"},"network":{"type":"string","example":"polygon"},"recipient":{"type":"string","example":"0x1234..."},"encrypted_inputs":{"type":"string"}},"type":"object"}}}},"responses":{"201":{"description":"Unshield operation initiated"},"401":{"description":"Unauthenticated"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/transfer":{"post":{"tags":["Privacy"],"summary":"Transfer tokens privately within the pool","description":"Private transfer within the privacy pool.","operationId":"privateTransfer","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["amount","token","network"],"properties":{"amount":{"type":"string","example":"25.00"},"token":{"type":"string","example":"USDC"},"network":{"type":"string","example":"polygon"},"recipient_commitment":{"type":"string"},"encrypted_inputs":{"type":"string"}},"type":"object"}}}},"responses":{"201":{"description":"Private transfer initiated"},"401":{"description":"Unauthenticated"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/viewing-key":{"get":{"tags":["Privacy"],"summary":"Get the user's viewing key for decrypting shielded notes","description":"Get the viewing key for the authenticated user.","operationId":"getViewingKey","responses":{"200":{"description":"Viewing key","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"viewing_key":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/proof-of-innocence":{"post":{"tags":["Privacy"],"summary":"Generate a proof that funds are not from sanctioned sources","description":"Generate a proof of innocence.","operationId":"generateProofOfInnocence","requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"transaction_hashes":{"type":"array","items":{"type":"string"}},"sanctions_list_root":{"type":"string"}},"type":"object"}}}},"responses":{"201":{"description":"Proof generated"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/proof-of-innocence\/{proofId}\/verify":{"get":{"tags":["Privacy"],"summary":"Verify a proof of innocence","description":"Verify a proof of innocence.","operationId":"verifyProofOfInnocence","parameters":[{"name":"proofId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Verification result","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"proof_id":{"type":"string"},"valid":{"type":"boolean"},"reason":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/srs-url":{"get":{"tags":["Privacy"],"summary":"Get the SRS download URL for a chain","description":"Get the SRS download URL for a specific chain.","operationId":"getSrsUrl","parameters":[{"name":"chain_id","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"SRS URL","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"url":{"type":"string"},"version":{"type":"string"},"circuits":{"type":"array","items":{"type":"object"}}},"type":"object"}},"type":"object"}}}}}}},"\/api\/v1\/privacy\/srs-status":{"get":{"tags":["Privacy"],"summary":"Get SRS download status for the current user","description":"Get the SRS download status for the authenticated user.","operationId":"getSrsStatus","responses":{"200":{"description":"SRS status","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"has_required":{"type":"boolean"},"version":{"type":"string"},"required_circuits":{"type":"array","items":{"type":"string"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/transaction-calldata\/{txHash}":{"get":{"tags":["Privacy"],"summary":"Get persisted calldata for a privacy transaction","description":"Get transaction calldata for a privacy transaction.","operationId":"getTransactionCalldata","parameters":[{"name":"txHash","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Transaction calldata retrieved"},"404":{"description":"Transaction not found"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/transactions\/{transactionId}\/tx-hash":{"put":{"tags":["Privacy"],"summary":"Record the on-chain tx hash after mobile submits the transaction","description":"Update the on-chain tx hash for a privacy transaction.","operationId":"updateTransactionHash","parameters":[{"name":"transactionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["tx_hash"],"properties":{"tx_hash":{"type":"string","example":"0x1234..."}},"type":"object"}}}},"responses":{"200":{"description":"Transaction hash updated"},"404":{"description":"Transaction not found"},"401":{"description":"Unauthenticated"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/engine-config":{"get":{"tags":["Privacy"],"summary":"On-device RAILGUN engine bootstrap config","description":"Returns the parameters the on-device RAILGUN engine needs to point at our self-hosted infra (POI node, artifact mirror, RPC). No secrets; RPC URLs are key-safe.","operationId":"getRailgunEngineConfig","responses":{"200":{"description":"Engine bootstrap config"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/privacy\/wallet\/register":{"post":{"tags":["Privacy"],"summary":"Register a non-custodial RAILGUN 0zk address","description":"The device creates the RAILGUN wallet locally and registers only its public 0zk address. No seed material is sent or stored.","operationId":"registerRailgunWallet","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["railgun_address","network"],"properties":{"railgun_address":{"type":"string","example":"0zk1q..."},"network":{"type":"string","enum":["ethereum","polygon","arbitrum","bsc"]}},"type":"object"}}}},"responses":{"200":{"description":"Registered"},"409":{"description":"Address already registered to another user"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/monitoring\/projector-health":{"get":{"tags":["Monitoring"],"summary":"Get projector health status","description":"Get projector health status.","operationId":"748637b095cc158893db1b23c66f10a0","responses":{"200":{"description":"Projector health status","content":{"application\/json":{"schema":{"properties":{"total_projectors":{"type":"integer"},"healthy":{"type":"integer"},"stale":{"type":"integer"},"failed":{"type":"integer"},"checked_at":{"type":"string","format":"date-time"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/monitoring\/projector-health\/stale":{"get":{"tags":["Monitoring"],"summary":"Get stale projectors","description":"Get stale projectors only.","operationId":"f92c5e924f2cb0f54c91034d94881b9e","responses":{"200":{"description":"List of stale projectors"}},"security":[{"sanctum":[]}]}},"\/api\/regtech\/compliance\/summary":{"get":{"tags":["RegTech"],"summary":"Get compliance summary","description":"Returns an overview of compliance status across all registered adapters. Optionally filter by jurisdiction.","operationId":"regtechComplianceSummary","parameters":[{"name":"jurisdiction","in":"query","description":"Filter by jurisdiction code","required":false,"schema":{"type":"string","example":"EU","enum":["US","EU","UK","SG"]}}],"responses":{"200":{"description":"Compliance summary retrieved","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"overall_status":{"type":"string","example":"compliant"},"jurisdictions":{"type":"array","items":{"properties":{"jurisdiction":{"type":"string","example":"EU"},"status":{"type":"string","example":"compliant"},"last_checked":{"type":"string","format":"date-time"}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/regtech\/reports":{"post":{"tags":["RegTech"],"summary":"Submit regulatory report","description":"Validates and submits a regulatory report to the appropriate jurisdiction adapter. Returns a reference ID for tracking.","operationId":"regtechSubmitReport","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["report_type","jurisdiction","report_data"],"properties":{"report_type":{"description":"Type of regulatory report","type":"string","example":"transaction_report","maxLength":50},"jurisdiction":{"description":"Target jurisdiction","type":"string","example":"EU","enum":["US","EU","UK","SG"]},"report_data":{"description":"Report payload data","properties":{"transaction_id":{"type":"string","example":"txn_abc123"},"amount":{"type":"number","format":"float","example":10000},"currency":{"type":"string","example":"EUR"}},"type":"object"},"metadata":{"description":"Optional metadata","properties":{"priority":{"type":"string","example":"high"},"notes":{"type":"string","example":"Quarterly filing"}},"type":"object","nullable":true}},"type":"object"}}}},"responses":{"201":{"description":"Report submitted successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"reference":{"type":"string","example":"RPT-EU-2024-abc123"},"details":{"properties":{"status":{"type":"string","example":"submitted"},"submitted_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"},"error":{"type":"object","nullable":true}},"type":"object"}}}},"422":{"description":"Validation failed or invalid jurisdiction","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"data":{"type":"object","nullable":true},"error":{"properties":{"code":{"type":"string","example":"INVALID_JURISDICTION"},"message":{"type":"string","example":"The provided jurisdiction is not supported."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/regtech\/reports\/{reference}\/status":{"get":{"tags":["RegTech"],"summary":"Check report status","description":"Retrieves the current processing status of a previously submitted regulatory report by its reference identifier.","operationId":"regtechReportStatus","parameters":[{"name":"reference","in":"path","description":"Report reference identifier (alphanumeric, hyphens, underscores; max 100 chars)","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9\\-_]{1,100}$","example":"RPT-EU-2024-abc123"}},{"name":"jurisdiction","in":"query","description":"Jurisdiction for status lookup (defaults to US)","required":false,"schema":{"type":"string","example":"EU","default":"US","enum":["US","EU","UK","SG"]}}],"responses":{"200":{"description":"Report status retrieved","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"reference":{"type":"string","example":"RPT-EU-2024-abc123"},"status":{"type":"string","example":"accepted"},"submitted_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Invalid reference format","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"INVALID_REFERENCE"},"message":{"type":"string","example":"Invalid report reference format."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/regtech\/adapters":{"get":{"tags":["RegTech"],"summary":"Get registered adapters","description":"Returns all registered jurisdiction adapters with their report types, availability, and sandbox mode status.","operationId":"regtechAdapters","responses":{"200":{"description":"Adapter list retrieved","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"adapters":{"type":"array","items":{"properties":{"key":{"type":"string","example":"eu_mifid"},"name":{"type":"string","example":"EU MiFID II Adapter"},"jurisdiction":{"type":"string","example":"EU"},"report_types":{"type":"array","items":{"type":"string"},"example":["transaction_report","best_execution"]},"available":{"type":"boolean","example":true},"sandbox":{"type":"boolean","example":true}},"type":"object"}},"total":{"type":"integer","example":4},"demo_mode":{"type":"boolean","example":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/regtech\/regulations\/applicable":{"get":{"tags":["RegTech"],"summary":"Get applicable regulations","description":"Determines which regulations apply to a given transaction based on amount, currency, type, and whether it involves crypto assets.","operationId":"regtechApplicableRegulations","parameters":[{"name":"amount","in":"query","description":"Transaction amount","required":true,"schema":{"type":"number","format":"float","example":15000,"maximum":999999999999.99,"minimum":0}},{"name":"currency","in":"query","description":"ISO 4217 currency code (3 uppercase letters)","required":true,"schema":{"type":"string","pattern":"^[A-Z]{3}$","example":"EUR"}},{"name":"transaction_type","in":"query","description":"Type of transaction","required":true,"schema":{"type":"string","example":"wire_transfer","maxLength":50}},{"name":"is_crypto","in":"query","description":"Whether the transaction involves crypto assets","required":false,"schema":{"type":"boolean","example":false,"default":false}}],"responses":{"200":{"description":"Applicable regulations retrieved","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"regulations":{"type":"array","items":{"properties":{"name":{"type":"string","example":"MiFID II"},"jurisdiction":{"type":"string","example":"EU"},"applicable":{"type":"boolean","example":true},"reason":{"type":"string","example":"Transaction exceeds reporting threshold"}},"type":"object"}},"query":{"properties":{"amount":{"type":"number","format":"float","example":15000},"currency":{"type":"string","example":"EUR"},"transaction_type":{"type":"string","example":"wire_transfer"},"is_crypto":{"type":"boolean","example":false}},"type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/regtech\/mifid\/status":{"get":{"tags":["RegTech"],"summary":"MiFID II status","description":"Returns MiFID II enablement status, best execution analysis data, and instrument reference data status.","operationId":"regtechMifidStatus","responses":{"200":{"description":"MiFID II status retrieved","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"enabled":{"type":"boolean","example":true},"best_execution":{"properties":{"venues_monitored":{"type":"integer","example":5},"last_analysis":{"type":"string","format":"date-time"},"compliance_score":{"type":"number","format":"float","example":0.95}},"type":"object"},"instrument_reference_data":{"properties":{"total_instruments":{"type":"integer","example":1200},"last_updated":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/regtech\/mica\/status":{"get":{"tags":["RegTech"],"summary":"MiCA status","description":"Returns the current MiCA (Markets in Crypto-Assets) compliance status including licensing, reserve, and whitepaper requirements.","operationId":"regtechMicaStatus","responses":{"200":{"description":"MiCA compliance status retrieved","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"licensed":{"type":"boolean","example":true},"whitepaper_approved":{"type":"boolean","example":true},"reserve_compliant":{"type":"boolean","example":true},"last_audit":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/regtech\/mica\/whitepaper\/validate":{"post":{"tags":["RegTech"],"summary":"Validate whitepaper","description":"Validates a crypto-asset whitepaper against MiCA requirements for completeness, required sections, and regulatory compliance.","operationId":"regtechValidateWhitepaper","requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"issuer_legal_name":{"description":"Legal name of the issuer","type":"string","example":"FinAegis Digital Assets AG","nullable":true,"maxLength":255},"publication_date":{"description":"Whitepaper publication date","type":"string","format":"date","example":"2024-06-15","nullable":true},"page_count":{"description":"Number of pages in the whitepaper","type":"integer","example":42,"nullable":true,"minimum":0},"sections":{"description":"Whitepaper sections to validate","type":"array","items":{"type":"string","example":"risk_factors"},"nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Whitepaper validation result","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"valid":{"type":"boolean","example":true},"score":{"type":"number","format":"float","example":0.85},"missing_sections":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"recommendations":{"type":"array","items":{"type":"string"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/regtech\/mica\/reserves":{"get":{"tags":["RegTech"],"summary":"MiCA reserves","description":"Returns the current status of reserves held to back crypto-asset tokens, as required by MiCA regulation. Includes reserve ratios, composition, and audit status.","operationId":"regtechMicaReserves","responses":{"200":{"description":"MiCA reserve status retrieved","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"total_reserves":{"type":"number","format":"float","example":50000000},"reserve_ratio":{"type":"number","format":"float","example":1.02},"compliant":{"type":"boolean","example":true},"last_audit":{"type":"string","format":"date-time"},"composition":{"type":"array","items":{"properties":{"asset_type":{"type":"string","example":"government_bonds"},"percentage":{"type":"number","format":"float","example":60}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/regtech\/travel-rule\/check":{"post":{"tags":["RegTech"],"summary":"Travel rule check","description":"Evaluates whether a transfer meets FATF Travel Rule requirements based on amount, currency, and originator\/beneficiary information.","operationId":"regtechTravelRuleCheck","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["amount","currency"],"properties":{"amount":{"description":"Transfer amount","type":"number","format":"float","example":5000,"minimum":0},"currency":{"description":"ISO 4217 currency code","type":"string","pattern":"^[A-Z]{3}$","example":"USD"},"originator":{"description":"Originator details","properties":{"name":{"type":"string","example":"John Doe","maxLength":255},"address":{"type":"string","example":"123 Main St, New York, NY","maxLength":500},"account_number":{"type":"string","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","maxLength":100},"doc_id":{"type":"string","example":"PASSPORT-12345","maxLength":100}},"type":"object","nullable":true},"beneficiary":{"description":"Beneficiary details","properties":{"name":{"type":"string","example":"Jane Smith","maxLength":255},"account_number":{"type":"string","example":"0x8ba1f109551bD432803012645Ac136ddd64DBA72","maxLength":100}},"type":"object","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Travel rule evaluation result","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"compliant":{"type":"boolean","example":true},"threshold_exceeded":{"type":"boolean","example":true},"applicable_jurisdictions":{"type":"array","items":{"type":"string"},"example":["US","EU"]},"required_fields":{"type":"array","items":{"type":"string"}},"missing_fields":{"type":"array","items":{"type":"string"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/regtech\/travel-rule\/thresholds":{"get":{"tags":["RegTech"],"summary":"Travel rule thresholds","description":"Returns the monetary thresholds at which the FATF Travel Rule applies for each supported jurisdiction, including currency and amount details.","operationId":"regtechTravelRuleThresholds","responses":{"200":{"description":"Travel rule thresholds retrieved","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"thresholds":{"type":"array","items":{"properties":{"jurisdiction":{"type":"string","example":"US"},"threshold_amount":{"type":"number","format":"float","example":3000},"currency":{"type":"string","example":"USD"},"applies_to_crypto":{"type":"boolean","example":true}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/regulatory\/reports\/ctr":{"post":{"tags":["Regulatory Reporting"],"summary":"Generate Currency Transaction Report","description":"Generates a CTR report for transactions exceeding regulatory thresholds (Admin only)","operationId":"generateCTR","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["date"],"properties":{"date":{"description":"Date for which to generate the CTR (must be today or earlier)","type":"string","format":"date","example":"2024-01-15"}},"type":"object"}}}},"responses":{"200":{"description":"CTR generated successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"type":{"type":"string","example":"ctr"},"date":{"type":"string","format":"date"},"filename":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"download_url":{"type":"string"}},"type":"object"},"message":{"type":"string","example":"Currency Transaction Report generated successfully"}},"type":"object"}}}},"500":{"description":"Failed to generate report"},"401":{"description":"Unauthenticated"},"403":{"description":"Forbidden - Admin access required"}},"security":[{"sanctum":[]}]}},"\/api\/regulatory\/reports\/sar":{"post":{"tags":["Regulatory Reporting"],"summary":"Generate SAR candidates report","description":"Generates a report of potential suspicious activities requiring SAR filing (Admin only)","operationId":"generateSARCandidates","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["start_date","end_date"],"properties":{"start_date":{"type":"string","format":"date","example":"2024-01-01"},"end_date":{"type":"string","format":"date","example":"2024-01-31"}},"type":"object"}}}},"responses":{"200":{"description":"SAR candidates report generated successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"type":{"type":"string","example":"sar_candidates"},"period_start":{"type":"string","format":"date"},"period_end":{"type":"string","format":"date"},"filename":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"download_url":{"type":"string"}},"type":"object"},"message":{"type":"string"}},"type":"object"}}}},"500":{"description":"Failed to generate report"},"401":{"description":"Unauthenticated"},"403":{"description":"Forbidden - Admin access required"}},"security":[{"sanctum":[]}]}},"\/api\/regulatory\/reports\/compliance-summary":{"post":{"tags":["Regulatory Reporting"],"summary":"Generate monthly compliance summary","description":"Generates a comprehensive compliance summary report for the specified month (Admin only)","operationId":"generateComplianceSummary","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["month"],"properties":{"month":{"description":"Month in YYYY-MM format","type":"string","pattern":"^\\d{4}-\\d{2}$","example":"2024-01"}},"type":"object"}}}},"responses":{"200":{"description":"Compliance summary generated successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"type":{"type":"string","example":"compliance_summary"},"month":{"type":"string","example":"January 2024"},"filename":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"download_url":{"type":"string"}},"type":"object"},"message":{"type":"string"}},"type":"object"}}}},"500":{"description":"Failed to generate report"},"401":{"description":"Unauthenticated"},"403":{"description":"Forbidden - Admin access required"}},"security":[{"sanctum":[]}]}},"\/api\/regulatory\/reports\/kyc":{"post":{"tags":["Regulatory Reporting"],"summary":"Generate KYC compliance report","description":"Generates a Know Your Customer (KYC) compliance status report (Admin only)","operationId":"generateKycReport","responses":{"200":{"description":"KYC report generated successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"type":{"type":"string","example":"kyc_compliance"},"filename":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"download_url":{"type":"string"}},"type":"object"},"message":{"type":"string"}},"type":"object"}}}},"500":{"description":"Failed to generate report"},"401":{"description":"Unauthenticated"},"403":{"description":"Forbidden - Admin access required"}},"security":[{"sanctum":[]}]}},"\/api\/regulatory\/reports":{"get":{"tags":["Regulatory Reporting"],"summary":"List all regulatory reports","description":"Retrieves a paginated list of all generated regulatory reports","operationId":"listRegulatoryReports","parameters":[{"name":"type","in":"query","description":"Filter by report type","required":false,"schema":{"type":"string","enum":["ctr","sar","compliance","kyc"]}},{"name":"limit","in":"query","description":"Number of reports per page","required":false,"schema":{"type":"integer","default":20,"maximum":100,"minimum":1}},{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer","default":1,"minimum":1}}],"responses":{"200":{"description":"Reports list retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"reports":{"type":"array","items":{"properties":{"type":{"type":"string"},"filename":{"type":"string"},"full_path":{"type":"string"},"size":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"download_url":{"type":"string"}},"type":"object"}},"pagination":{"properties":{"total":{"type":"integer"},"per_page":{"type":"integer"},"current_page":{"type":"integer"},"last_page":{"type":"integer"},"has_more":{"type":"boolean"}},"type":"object"}},"type":"object"},"meta":{"properties":{"available_types":{"type":"array","items":{"type":"string"}},"total_reports":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"500":{"description":"Failed to list reports"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/regulatory\/reports\/{filename}":{"get":{"tags":["Regulatory Reporting"],"summary":"Get specific report content","description":"Retrieves the full content of a specific regulatory report","operationId":"getRegulatoryReport","parameters":[{"name":"filename","in":"path","description":"Report filename","required":true,"schema":{"type":"string","example":"ctr-2024-01-15.json"}}],"responses":{"200":{"description":"Report retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"filename":{"type":"string"},"file_path":{"type":"string"},"size":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"content":{"description":"Full report content","type":"object"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid filename format"},"404":{"description":"Report not found"},"500":{"description":"Failed to retrieve report"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]},"delete":{"tags":["Regulatory Reporting"],"summary":"Delete a regulatory report","description":"Permanently deletes a regulatory report file (Admin only)","operationId":"deleteRegulatoryReport","parameters":[{"name":"filename","in":"path","description":"Report filename to delete","required":true,"schema":{"type":"string","example":"ctr-2024-01-15.json"}}],"responses":{"200":{"description":"Report deleted successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"filename":{"type":"string"},"deleted_at":{"type":"string","format":"date-time"}},"type":"object"},"message":{"type":"string","example":"Report deleted successfully"}},"type":"object"}}}},"400":{"description":"Invalid filename format"},"404":{"description":"Report not found"},"500":{"description":"Failed to delete report"},"401":{"description":"Unauthenticated"},"403":{"description":"Forbidden - Admin access required"}},"security":[{"sanctum":[]}]}},"\/api\/regulatory\/reports\/{filename}\/download":{"get":{"tags":["Regulatory Reporting"],"summary":"Download regulatory report file","description":"Downloads a regulatory report file as JSON attachment","operationId":"downloadRegulatoryReport","parameters":[{"name":"filename","in":"path","description":"Report filename to download","required":true,"schema":{"type":"string","example":"ctr-2024-01-15.json"}}],"responses":{"200":{"description":"File download successful","headers":{"Content-Type":{"description":"Content type of the file","schema":{"type":"string","example":"application\/json"}},"Content-Disposition":{"description":"Attachment header with filename","schema":{"type":"string","example":"attachment; filename=ctr-2024-01-15.json"}}},"content":{"application\/json":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid filename format"},"404":{"description":"Report not found"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/regulatory\/metrics":{"get":{"tags":["Regulatory Reporting"],"summary":"Get regulatory compliance metrics","description":"Retrieves comprehensive regulatory compliance metrics and KPIs (Admin only)","operationId":"getRegulatoryMetrics","parameters":[{"name":"period","in":"query","description":"Time period for metrics","required":false,"schema":{"type":"string","default":"month","enum":["week","month","quarter","year"]}}],"responses":{"200":{"description":"Metrics retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"period":{"type":"string"},"period_start":{"type":"string","format":"date"},"period_end":{"type":"string","format":"date"},"metrics":{"properties":{"kyc":{"description":"KYC compliance metrics","type":"object"},"transactions":{"description":"Transaction monitoring metrics","type":"object"},"users":{"description":"User compliance metrics","type":"object"},"risk":{"description":"Risk assessment metrics","type":"object"},"gdpr":{"description":"GDPR compliance metrics","type":"object"}},"type":"object"},"generated_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"500":{"description":"Failed to retrieve metrics"},"401":{"description":"Unauthenticated"},"403":{"description":"Forbidden - Admin access required"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/relayer\/status":{"get":{"tags":["Relayer"],"summary":"Get relayer status and gas prices","description":"Returns current relayer system health, supported networks with gas prices and congestion levels.","operationId":"relayerStatus","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"healthy":{"type":"boolean","example":true},"networks":{"type":"array","items":{"properties":{"network":{"type":"string","example":"polygon"},"chain_id":{"type":"integer","example":137},"gas_price_gwei":{"type":"string","example":"30"},"congestion":{"type":"string","example":"low"},"native_currency":{"type":"string","example":"MATIC"}},"type":"object"}},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/relayer\/estimate-gas":{"post":{"tags":["Relayer"],"summary":"Estimate gas for a transaction","description":"Estimates gas cost for a transaction on the specified network. Returns ERC-4337 compatible gas fields.","operationId":"relayerEstimateGas","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["network","to"],"properties":{"network":{"description":"Target network","type":"string","example":"polygon"},"to":{"description":"Destination address","type":"string","example":"0x1234...abcd"},"value":{"description":"Transfer value","type":"string","example":"1000000"},"data":{"description":"Call data","type":"string","example":"0x"}},"type":"object"}}}},"responses":{"200":{"description":"Gas estimate returned","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"network":{"type":"string","example":"polygon"},"gas_price":{"type":"string","example":"30"},"gas_limit":{"type":"string","example":"200000"},"total_cost":{"type":"string","example":"0.05"},"total_fee_usd":{"type":"number","format":"float","example":0.05},"currency":{"type":"string","example":"MATIC"},"sponsored":{"type":"boolean","example":true},"call_gas_limit":{"type":"string","example":"200000"},"verification_gas_limit":{"type":"string","example":"100000"},"pre_verification_gas":{"type":"string","example":"21000"},"max_fee_per_gas":{"type":"string","example":"30"},"max_priority_fee_per_gas":{"type":"string","example":"2"},"paymaster_fee":{"type":"string","example":"0"},"paymaster_fee_usd":{"type":"number","format":"float","example":0}},"type":"object"}},"type":"object"}}}},"422":{"description":"Unsupported network","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNSUPPORTED_NETWORK"},"message":{"type":"string","example":"Network not supported."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/relayer\/build-userop":{"post":{"tags":["Relayer"],"summary":"Build a UserOperation from parameters","description":"Constructs an ERC-4337 UserOperation struct from the provided transaction parameters.","operationId":"relayerBuildUserOp","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["network","to"],"properties":{"network":{"description":"Target network","type":"string","example":"polygon"},"to":{"description":"Destination address","type":"string","example":"0x1234...abcd"},"value":{"description":"Transfer value","type":"string","example":"1000000"},"data":{"description":"Call data","type":"string","example":"0x"},"from":{"description":"Sender address","type":"string","example":"0x0"}},"type":"object"}}}},"responses":{"200":{"description":"UserOperation built successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"user_op":{"properties":{"sender":{"type":"string","example":"0x0"},"nonce":{"type":"string","example":"0x0"},"initCode":{"type":"string","example":"0x"},"callData":{"type":"string","example":"0x"},"callGasLimit":{"type":"string","example":"0x30D40"},"verificationGasLimit":{"type":"string","example":"0x186A0"},"preVerificationGas":{"type":"string","example":"0xC350"},"maxFeePerGas":{"type":"string"},"maxPriorityFeePerGas":{"type":"string"},"paymasterAndData":{"type":"string","example":"0x"},"signature":{"type":"string","example":"0x"}},"type":"object"},"network":{"type":"string","example":"polygon"},"entry_point":{"type":"string","example":"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Unsupported network","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNSUPPORTED_NETWORK"},"message":{"type":"string","example":"Network not supported."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/relayer\/submit":{"post":{"tags":["Relayer"],"summary":"Submit a signed UserOperation","description":"Submits a signed ERC-4337 UserOperation to the bundler for on-chain execution.","operationId":"relayerSubmitUserOp","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["network","user_op","signature"],"properties":{"network":{"description":"Target network","type":"string","example":"polygon"},"user_op":{"description":"The UserOperation struct","type":"object"},"signature":{"description":"Signed UserOperation signature","type":"string","example":"0xabcdef..."}},"type":"object"}}}},"responses":{"201":{"description":"UserOperation submitted","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"user_op_hash":{"type":"string","example":"0xabc123..."},"network":{"type":"string","example":"polygon"},"status":{"type":"string","example":"pending"},"submitted_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Unsupported network","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNSUPPORTED_NETWORK"},"message":{"type":"string","example":"Network not supported."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/relayer\/userop\/{hash}":{"get":{"tags":["Relayer"],"summary":"Get UserOperation status by hash","description":"Returns the current status and details of a previously submitted UserOperation.","operationId":"relayerGetUserOp","parameters":[{"name":"hash","in":"path","description":"The UserOperation hash","required":true,"schema":{"type":"string","example":"0xabc123..."}}],"responses":{"200":{"description":"UserOperation details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"user_op_hash":{"type":"string","example":"0xabc123..."},"status":{"type":"string","example":"pending"},"tx_hash":{"type":"string","example":null,"nullable":true},"block_number":{"type":"integer","example":null,"nullable":true},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/relayer\/supported-tokens":{"get":{"tags":["Relayer"],"summary":"Get tokens accepted for gas payment","description":"Returns the list of tokens accepted by the paymaster for sponsored gas payments.","operationId":"relayerSupportedTokens","responses":{"200":{"description":"Supported tokens list","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"symbol":{"type":"string","example":"USDC"},"name":{"type":"string","example":"USD Coin"},"sponsored":{"type":"boolean","example":true}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/relayer\/paymaster-data":{"get":{"tags":["Relayer"],"summary":"Get paymaster configuration data","description":"Returns paymaster addresses, entry points, sponsored tokens and gas limits per network.","operationId":"relayerPaymasterData","responses":{"200":{"description":"Paymaster configuration per network","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"network":{"type":"string","example":"polygon"},"paymaster_address":{"type":"string","example":"0x1234..."},"entry_point":{"type":"string","example":"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"},"sponsored_tokens":{"type":"array","items":{"type":"string"},"example":["USDC","USDT"]},"max_gas_sponsored":{"type":"string","example":"500000"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/relayer\/networks\/{network}\/status":{"get":{"tags":["Relayer"],"summary":"Get per-network relayer status","description":"Returns detailed relayer status for a specific network including gas prices, block number and relayer queue depth.","operationId":"relayerNetworkStatus","parameters":[{"name":"network","in":"path","description":"Network identifier (e.g. polygon, ethereum, arbitrum)","required":true,"schema":{"type":"string","example":"polygon"}}],"responses":{"200":{"description":"Network relayer status","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"chainId":{"type":"integer","example":137},"network":{"type":"string","example":"polygon"},"status":{"type":"string","example":"operational"},"gasPrice":{"properties":{"gwei":{"type":"number","format":"float","example":30},"usdEstimate":{"type":"number","format":"float","example":0.01}},"type":"object"},"blockNumber":{"type":"integer","example":55000000},"relayer":{"properties":{"status":{"type":"string","example":"active"},"queueDepth":{"type":"integer","example":0},"avgConfirmationMs":{"type":"integer","example":2400}},"type":"object"},"updatedAt":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Unsupported network","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"UNSUPPORTED_NETWORK"},"message":{"type":"string","example":"Network 'unsupported' is not supported"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/relayer\/sponsor":{"post":{"tags":["Gas Relayer"],"summary":"Submit a sponsored transaction","description":"Sponsor a transaction (meta-transaction).\n\nAllows users to execute blockchain transactions without holding native\ngas tokens (ETH\/MATIC). The fee is deducted from their stablecoin balance.\n\nFor first-time account deployment, include the init_code parameter with\nthe Smart Account factory call data.","operationId":"7e4c07a424eee8f0874198f2de05b951","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["user_address","call_data","signature"],"properties":{"user_address":{"type":"string","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"},"call_data":{"description":"Encoded transaction calldata","type":"string"},"signature":{"description":"User's signature","type":"string"},"network":{"type":"string","example":"polygon","enum":["polygon","arbitrum","optimism","base","ethereum"]},"fee_token":{"type":"string","example":"USDC","enum":["USDC","USDT"]},"init_code":{"description":"Factory calldata for first-time account deployment","type":"string","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Transaction sponsored","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"tx_hash":{"type":"string"},"user_op_hash":{"type":"string"},"gas_used":{"type":"integer"},"fee_charged":{"type":"string","example":"0.050000"},"fee_currency":{"type":"string","example":"USDC"},"is_deployment":{"type":"boolean","example":false}},"type":"object"}},"type":"object"}}}},"400":{"description":"Transaction failed"},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/relayer\/estimate":{"post":{"tags":["Gas Relayer"],"summary":"Estimate gas fee in stablecoins","description":"Estimate gas fee for a transaction.","operationId":"609185faa4ac3de30748acc9470806d9","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["call_data"],"properties":{"call_data":{"type":"string"},"network":{"type":"string","enum":["polygon","arbitrum","optimism","base","ethereum"]}},"type":"object"}}}},"responses":{"200":{"description":"Fee estimate","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"estimated_gas":{"type":"integer"},"fee_usdc":{"type":"string","example":"0.050000"},"fee_usdt":{"type":"string","example":"0.050000"},"network":{"type":"string"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/relayer\/networks":{"get":{"tags":["Gas Relayer"],"summary":"List supported networks with ERC-4337 configuration","description":"Get supported networks and their detailed configuration.\n\nReturns ERC-4337 infrastructure addresses and current gas prices for each network.","operationId":"0d1dd0d363427103b409b1b4a6a1914d","responses":{"200":{"description":"List of supported networks with detailed configuration","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"chain_id":{"type":"integer","example":137},"name":{"type":"string","example":"polygon"},"entrypoint_address":{"type":"string","example":"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"},"factory_address":{"type":"string","example":"0x..."},"paymaster_address":{"type":"string","example":"0x..."},"current_gas_price":{"type":"string","example":"30"},"average_fee_usdc":{"type":"string","example":"0.0200"},"congestion_level":{"type":"string","example":"low","enum":["low","medium","high"]},"fee_token":{"type":"string","example":"USDC"}},"type":"object"}}},"type":"object"}}}}}}},"\/api\/v1\/relayer\/account":{"get":{"tags":["Smart Accounts"],"summary":"Get user's primary smart account","description":"Get the user's primary smart account.\n\nReturns the first smart account created for the authenticated user,\noptionally filtered by network. Useful for mobile apps that need\na single account reference.","operationId":"21f6b3186ece271c0881b4877b4c93ad","parameters":[{"name":"network","in":"query","required":false,"schema":{"type":"string","enum":["polygon","base","arbitrum"]}}],"responses":{"200":{"description":"Primary smart account","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"id":{"type":"string","format":"uuid"},"owner_address":{"type":"string"},"account_address":{"type":"string"},"network":{"type":"string"},"deployed":{"type":"boolean"},"nonce":{"type":"integer"},"pending_ops":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"No smart account found"}},"security":[{"sanctum":[]}]},"post":{"tags":["Smart Accounts"],"summary":"Create or retrieve a smart account","description":"Create or retrieve a smart account.\n\nReturns the counterfactual smart account address for the given owner.\nThe account is computed deterministically but not deployed on-chain\nuntil the first transaction.\n\nIf owner_address is omitted, the server derives a deterministic address\nfrom the authenticated user, enabling initial account creation during\nonboarding when the user has no wallet yet.","operationId":"db3d0966b9d62887c4b1a9f102719b22","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["network"],"properties":{"owner_address":{"description":"EOA owner address. If omitted, derived from authenticated user.","type":"string","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e","nullable":true},"network":{"type":"string","example":"polygon","enum":["polygon","base","arbitrum"]}},"type":"object"}}}},"responses":{"200":{"description":"Smart account details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"id":{"type":"string","format":"uuid"},"owner_address":{"type":"string"},"account_address":{"type":"string"},"network":{"type":"string"},"deployed":{"type":"boolean"},"nonce":{"type":"integer"},"pending_ops":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/relayer\/nonce\/{address}":{"get":{"tags":["Smart Accounts"],"summary":"Get nonce and pending ops for a smart account","description":"Get nonce and pending operations for a smart account.","operationId":"3479011e0b5aa8dcd18745e5e5b43972","parameters":[{"name":"address","in":"path","description":"Owner address (EOA)","required":true,"schema":{"type":"string","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"}},{"name":"network","in":"query","required":true,"schema":{"type":"string","enum":["polygon","base","arbitrum"]}}],"responses":{"200":{"description":"Nonce information","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"nonce":{"type":"integer","example":5},"pending_ops":{"type":"integer","example":1},"deployed":{"type":"boolean","example":true}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"},"404":{"description":"Account not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/relayer\/init-code\/{address}":{"get":{"tags":["Smart Accounts"],"summary":"Get init code for account deployment","description":"Get init code for a smart account deployment.\n\nReturns the init code needed to deploy the smart account on first transaction.\nReturns empty string if account is already deployed.","operationId":"3a7c5727aa896e98661af8d2a7644de0","parameters":[{"name":"address","in":"path","description":"Owner address (EOA)","required":true,"schema":{"type":"string"}},{"name":"network","in":"query","required":true,"schema":{"type":"string","enum":["polygon","base","arbitrum"]}}],"responses":{"200":{"description":"Init code","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"init_code":{"type":"string"},"needs_deployment":{"type":"boolean"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/relayer\/accounts":{"get":{"tags":["Smart Accounts"],"summary":"List user's smart accounts","description":"List user's smart accounts.","operationId":"11df280da97c0637318f9453ac919186","responses":{"200":{"description":"List of smart accounts","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"id":{"type":"string","format":"uuid"},"owner_address":{"type":"string"},"account_address":{"type":"string"},"network":{"type":"string"},"deployed":{"type":"boolean"}},"type":"object"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/rewards\/profile":{"get":{"tags":["Rewards"],"summary":"Get rewards profile","description":"Returns the user's XP, level, streak, and points balance.","operationId":"getRewardsProfile","responses":{"200":{"description":"Rewards profile","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"xp":{"type":"integer","example":250},"level":{"type":"integer","example":3},"xp_for_next":{"type":"integer","example":300},"xp_progress":{"type":"number","example":0.83},"current_streak":{"type":"integer","example":5},"longest_streak":{"type":"integer","example":12},"points_balance":{"type":"integer","example":1500},"quests_completed":{"type":"integer","example":8}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/rewards\/quests":{"get":{"tags":["Rewards"],"summary":"Get available quests","description":"Returns active quests with the user's completion status.","operationId":"getRewardsQuests","responses":{"200":{"description":"Quests list","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"id":{"type":"string"},"slug":{"type":"string","example":"first-shield"},"title":{"type":"string","example":"First Shield"},"description":{"type":"string"},"xp_reward":{"type":"integer","example":50},"points_reward":{"type":"integer","example":100},"category":{"type":"string","example":"onboarding"},"completed":{"type":"boolean","example":false}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/rewards\/shop":{"get":{"tags":["Rewards"],"summary":"Get rewards shop items","description":"Returns active shop items available for point redemption.","operationId":"getRewardsShop","responses":{"200":{"description":"Shop items list","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"id":{"type":"string"},"title":{"type":"string"},"points_cost":{"type":"integer"},"available":{"type":"boolean"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/rewards\/shop\/{id}\/redeem":{"post":{"tags":["Rewards"],"summary":"Redeem a shop item","description":"Spends points to redeem a shop item.","operationId":"redeemRewardsShopItem","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Item redeemed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"redemption_id":{"type":"string"},"points_spent":{"type":"integer"},"points_balance":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Insufficient points or item unavailable"}},"security":[{"sanctum":[]}]}},"\/api\/risk\/users\/{userId}\/profile":{"get":{"tags":["Risk Management"],"summary":"Get risk profile for a specific user","operationId":"riskGetUserRiskProfile","parameters":[{"name":"userId","in":"path","description":"User ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"user_id":{"type":"string"},"risk_score":{"type":"integer"},"risk_level":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/risk\/transactions\/{transactionId}\/analyze":{"get":{"tags":["Risk Management"],"summary":"Analyze risk for a specific transaction (GET)","operationId":"riskAnalyzeTransactionGet","parameters":[{"name":"transactionId","in":"path","description":"Transaction ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"transaction_id":{"type":"string"},"risk_score":{"type":"integer"},"risk_factors":{"type":"array","items":{"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]},"post":{"tags":["Risk Management"],"summary":"Analyze risk for a specific transaction (POST)","operationId":"riskAnalyzeTransactionPost","parameters":[{"name":"transactionId","in":"path","description":"Transaction ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"transaction_id":{"type":"string"},"risk_score":{"type":"integer"},"risk_factors":{"type":"array","items":{"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/risk\/calculate":{"post":{"tags":["Risk Management"],"summary":"Calculate risk score based on provided parameters","operationId":"riskCalculateRiskScore","requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"user_id":{"type":"string"},"transaction_data":{"type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"risk_score":{"type":"integer"},"risk_level":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/risk\/factors":{"get":{"tags":["Risk Management"],"summary":"List all risk factors","operationId":"riskGetRiskFactors","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/risk\/models":{"get":{"tags":["Risk Management"],"summary":"List all risk analysis models","operationId":"riskGetRiskModels","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/risk\/users\/{userId}\/history":{"get":{"tags":["Risk Management"],"summary":"Get risk assessment history for a specific user","operationId":"riskGetRiskHistory","parameters":[{"name":"userId","in":"path","description":"User ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"meta":{"properties":{"user_id":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/risk\/device-fingerprint":{"post":{"tags":["Risk Management"],"summary":"Store a device fingerprint for risk analysis","operationId":"riskStoreDeviceFingerprint","requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"device_id":{"type":"string"},"fingerprint":{"type":"string"},"user_agent":{"type":"string"},"ip_address":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string"},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/risk\/users\/{userId}\/devices":{"get":{"tags":["Risk Management"],"summary":"Get device history for a specific user","operationId":"riskGetDeviceHistory","parameters":[{"name":"userId","in":"path","description":"User ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"meta":{"properties":{"user_id":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/sms\/send":{"post":{"tags":["SMS"],"summary":"Send an SMS message (payment-gated)","description":"Send an SMS to any phone number via VertexSMS. Protected by MPP payment gate \u2014 the first request without payment returns 402 with available rails and pricing. After paying via USDC (x402), Stripe, or Lightning, resend with the payment proof in the Authorization header. Rate limited to 60 requests\/minute, 1 SMS\/second outbound.","operationId":"smsSend","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["to","message"],"properties":{"to":{"description":"E.164 phone number (international format with + prefix)","type":"string","example":"+37069912345"},"from":{"description":"Sender ID \u2014 alphanumeric, max 20 chars. Defaults to configured sender ID if omitted.","type":"string","example":"Zelta"},"message":{"description":"Message body, max 1600 chars. Long messages are automatically split into multiple parts and priced accordingly.","type":"string","example":"Hello from Zelta!"}},"type":"object"}}}},"responses":{"200":{"description":"SMS sent successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"message_id":{"description":"VertexSMS message ID \u2014 use with GET \/v1\/sms\/status\/{id}","type":"string","example":"1281532560"},"status":{"type":"string","example":"sent","enum":["sent"]},"parts":{"description":"Number of SMS parts (long messages split automatically)","type":"integer","example":1},"destination":{"type":"string","example":"+37069912345"},"price_usdc":{"description":"Charged amount in atomic USDC (6 decimals, e.g. 48438 = $0.048438)","type":"string","example":"48438"}},"type":"object"}},"type":"object"}}}},"402":{"description":"Payment required \u2014 MPP challenge with available rails and pricing","content":{"application\/json":{"schema":{"properties":{"type":{"type":"string","example":"urn:ietf:rfc:9457"},"title":{"type":"string","example":"Payment Required"},"detail":{"type":"string","example":"This resource requires payment via the Machine Payment Protocol."}},"type":"object"}}}},"422":{"description":"Validation error \u2014 invalid phone number format, missing message, or message exceeds 1600 chars"},"503":{"description":"SMS service disabled \u2014 SMS_ENABLED is false"}}}},"\/api\/v1\/sms\/rates":{"get":{"tags":["SMS"],"summary":"Get SMS rates for a country","description":"Returns per-message pricing for a given ISO 3166-1 alpha-2 country code. Rates are sourced from VertexSMS in EUR and converted to atomic USDC with a configurable margin. Public endpoint \u2014 no authentication required.","operationId":"smsRates","parameters":[{"name":"country","in":"query","description":"ISO 3166-1 alpha-2 country code (e.g. LT, DE, US)","required":true,"schema":{"type":"string","maxLength":2,"minLength":2},"example":"LT"}],"responses":{"200":{"description":"Rate found","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"country":{"description":"Country name","type":"string","example":"Lithuania"},"country_code":{"description":"ISO 3166-1 alpha-2","type":"string","example":"LT"},"rate_eur":{"description":"VertexSMS rate per SMS part in EUR","type":"string","example":"0.0390"},"rate_usdc":{"description":"Per-part price in atomic USDC (6 decimals, includes margin)","type":"string","example":"48438"}},"type":"object"}},"type":"object"}}}},"404":{"description":"No rate found for country"},"422":{"description":"Invalid country code \u2014 must be exactly 2 alphabetic characters"}}}},"\/api\/v1\/sms\/status\/{messageId}":{"get":{"tags":["SMS"],"summary":"Get message delivery status","description":"Returns the current delivery status of a previously sent SMS. The message_id is the value returned from POST \/v1\/sms\/send. Statuses progress: pending \u2192 sent \u2192 delivered (or failed). Delivery reports are received asynchronously from VertexSMS via webhook.","operationId":"smsStatus","parameters":[{"name":"messageId","in":"path","description":"The message_id returned from POST \/v1\/sms\/send","required":true,"schema":{"type":"string"},"example":"1281532560"}],"responses":{"200":{"description":"Message status","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"message_id":{"type":"string","example":"1281532560"},"status":{"type":"string","example":"delivered","enum":["pending","sent","delivered","failed"]},"delivered_at":{"description":"ISO 8601 timestamp when delivered, null if not yet delivered","type":"string","example":"2026-04-17T12:01:05+00:00","nullable":true},"payment_status":{"description":"Payment settlement status","type":"string","example":"settled","nullable":true,"enum":["pending","settled"]}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"404":{"description":"Message not found \u2014 no message with this ID exists"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/sms\/info":{"get":{"tags":["SMS"],"summary":"Get SMS service info","description":"Returns the active SMS provider, enabled\/disabled status, test mode flag, and supported payment networks (CAIP-2 format). Public endpoint \u2014 no authentication required.","operationId":"smsInfo","responses":{"200":{"description":"Service info","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"provider":{"description":"Active SMS provider","type":"string","example":"vertexsms"},"enabled":{"description":"Whether SMS sending is enabled","type":"boolean","example":true},"test_mode":{"description":"When true, messages are accepted but not delivered","type":"boolean","example":false},"networks":{"description":"Supported payment networks in CAIP-2 format (Base, Ethereum)","type":"array","items":{"type":"string"},"example":"[\"eip155:8453\",\"eip155:1\"]"}},"type":"object"}},"type":"object"}}}}}}},"\/api\/settings":{"get":{"tags":["Settings"],"summary":"Get public settings","description":"Retrieves all public application settings","operationId":"settingsIndex","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/settings\/group\/{group}":{"get":{"tags":["Settings"],"summary":"Get settings by group","description":"Retrieves public settings filtered by group name","operationId":"settingsGroup","parameters":[{"name":"group","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/stablecoins":{"get":{"tags":["Stablecoins"],"summary":"List all stablecoins","description":"Retrieve a list of all configured stablecoins with optional filtering","operationId":"listStablecoins","parameters":[{"name":"active_only","in":"query","description":"Filter to show only active stablecoins","required":false,"schema":{"type":"boolean"}},{"name":"minting_enabled","in":"query","description":"Filter to show only stablecoins with minting enabled","required":false,"schema":{"type":"boolean"}},{"name":"burning_enabled","in":"query","description":"Filter to show only stablecoins with burning enabled","required":false,"schema":{"type":"boolean"}},{"name":"stability_mechanism","in":"query","description":"Filter by stability mechanism type","required":false,"schema":{"type":"string","enum":["collateralized","algorithmic","hybrid"]}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}}}},"post":{"tags":["Stablecoins"],"summary":"Create a new stablecoin","description":"Create a new stablecoin configuration","operationId":"createStablecoin","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"Stablecoin created successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v2\/stablecoins\/{code}":{"get":{"tags":["Stablecoins"],"summary":"Get stablecoin details","description":"Retrieve detailed information about a specific stablecoin including collateralization metrics","operationId":"getStablecoin","parameters":[{"name":"code","in":"path","description":"The stablecoin code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object"}},"type":"object"}}}},"404":{"description":"Stablecoin not found","content":{"application\/json":{"schema":{"type":"object"}}}}}},"put":{"tags":["Stablecoins"],"summary":"Update stablecoin configuration","description":"Update an existing stablecoin's configuration parameters","operationId":"updateStablecoin","parameters":[{"name":"code","in":"path","description":"The stablecoin code","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","example":"FinAegis USD Updated"},"collateral_ratio":{"type":"number","example":1.6},"min_collateral_ratio":{"type":"number","example":1.3},"liquidation_penalty":{"type":"number","example":0.1},"max_supply":{"type":"integer","example":10000000},"mint_fee":{"type":"number","example":0.004},"burn_fee":{"type":"number","example":0.003},"is_active":{"type":"boolean","example":true},"minting_enabled":{"type":"boolean","example":true},"burning_enabled":{"type":"boolean","example":true},"metadata":{"type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"Stablecoin updated successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object"}},"type":"object"}}}},"404":{"description":"Stablecoin not found"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/stablecoins\/{code}\/metrics":{"get":{"tags":["Stablecoins"],"summary":"Get stablecoin metrics and statistics","description":"Retrieve detailed metrics and statistics for a specific stablecoin","operationId":"getStablecoinMetrics","parameters":[{"name":"code","in":"path","description":"The stablecoin code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"stablecoin_code":{"type":"string","example":"FUSD"},"total_supply":{"type":"integer","example":1000000},"total_collateral_value":{"type":"integer","example":1500000},"global_ratio":{"type":"number","example":1.5},"target_ratio":{"type":"number","example":1.5},"min_ratio":{"type":"number","example":1.2},"active_positions":{"type":"integer","example":25},"at_risk_positions":{"type":"integer","example":2},"is_healthy":{"type":"boolean","example":true},"collateral_distribution":{"type":"array","items":{"type":"object"}}},"type":"object"}},"type":"object"}}}},"404":{"description":"Stablecoin not found or no metrics available"}}}},"\/api\/v2\/stablecoins\/metrics":{"get":{"tags":["Stablecoins"],"summary":"Get system-wide stablecoin metrics","description":"Retrieve metrics for all stablecoins in the system","operationId":"getSystemStablecoinMetrics","responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"type":"object","additionalProperties":{"properties":{"stablecoin_code":{"type":"string"},"total_supply":{"type":"integer"},"global_ratio":{"type":"number"},"is_healthy":{"type":"boolean"}},"type":"object"}}},"type":"object"}}}}}}},"\/api\/v2\/stablecoins\/{code}\/stability":{"post":{"tags":["Stablecoins"],"summary":"Execute stability mechanisms for a stablecoin","description":"Trigger stability mechanism execution for a specific stablecoin","operationId":"executeStabilityMechanism","parameters":[{"name":"code","in":"path","description":"The stablecoin code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"success":{"type":"boolean","example":true},"mechanism":{"type":"string","example":"collateralized"},"global_ratio":{"type":"number","example":1.5},"target_ratio":{"type":"number","example":1.5},"actions_taken":{"type":"array","items":{"type":"object"}}},"type":"object"}},"type":"object"}}}},"404":{"description":"Stablecoin not found"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/stablecoins\/health":{"get":{"tags":["Stablecoins"],"summary":"Check system health across all stablecoins","description":"Retrieve system-wide health status for all stablecoins","operationId":"getStablecoinSystemHealth","responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"overall_status":{"type":"string","example":"healthy"},"stablecoin_status":{"type":"array","items":{"type":"object"}},"emergency_actions":{"type":"array","items":{"type":"string"}}},"type":"object"}},"type":"object"}}}}}}},"\/api\/v2\/stablecoins\/{code}\/collateral":{"get":{"tags":["Stablecoins"],"summary":"Get collateral distribution for a stablecoin","description":"Retrieve the distribution of collateral assets backing a stablecoin","operationId":"getStablecoinCollateralDistribution","parameters":[{"name":"code","in":"path","description":"The stablecoin code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"asset_code":{"type":"string","example":"USD"},"total_amount":{"type":"integer","example":800000},"total_value":{"type":"integer","example":800000},"position_count":{"type":"integer","example":15},"percentage":{"type":"number","example":53.33}},"type":"object"}}},"type":"object"}}}},"404":{"description":"Stablecoin not found"}}}},"\/api\/v2\/stablecoins\/{code}\/deactivate":{"post":{"tags":["Stablecoins"],"summary":"Deactivate a stablecoin","description":"Deactivate a stablecoin, disabling minting and burning","operationId":"deactivateStablecoin","parameters":[{"name":"code","in":"path","description":"The stablecoin code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stablecoin deactivated successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Stablecoin deactivated successfully"},"data":{"type":"object"}},"type":"object"}}}},"404":{"description":"Stablecoin not found"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/stablecoins\/{code}\/reactivate":{"post":{"tags":["Stablecoins"],"summary":"Reactivate a stablecoin","description":"Reactivate a previously deactivated stablecoin","operationId":"reactivateStablecoin","parameters":[{"name":"code","in":"path","description":"The stablecoin code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stablecoin reactivated successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Stablecoin reactivated successfully"},"data":{"type":"object"}},"type":"object"}}}},"404":{"description":"Stablecoin not found"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/stablecoin-operations\/mint":{"post":{"tags":["Stablecoin Operations"],"summary":"Mint stablecoins by locking collateral","description":"Create a new collateral position and mint stablecoins against it","operationId":"mintStablecoin","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["account_uuid","stablecoin_code","collateral_asset_code","collateral_amount","mint_amount"],"properties":{"account_uuid":{"description":"Account UUID to mint for","type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"stablecoin_code":{"description":"Stablecoin to mint","type":"string","example":"FUSD"},"collateral_asset_code":{"description":"Asset to use as collateral","type":"string","example":"USD"},"collateral_amount":{"description":"Amount of collateral to lock (in smallest unit)","type":"integer","example":150000},"mint_amount":{"description":"Amount of stablecoin to mint (in smallest unit)","type":"integer","example":100000}},"type":"object"}}}},"responses":{"200":{"description":"Stablecoin minted successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Stablecoin minted successfully"},"data":{"properties":{"position_uuid":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"account_uuid":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"stablecoin_code":{"type":"string","example":"FUSD"},"collateral_asset_code":{"type":"string","example":"USD"},"collateral_amount":{"type":"integer","example":150000},"debt_amount":{"type":"integer","example":100000},"collateral_ratio":{"type":"string","example":"1.5000"},"status":{"type":"string","example":"active"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Bad request","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ValidationError"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v2\/stablecoin-operations\/burn":{"post":{"tags":["Stablecoin Operations"],"summary":"Burn stablecoins and release collateral","description":"Burn stablecoins to reduce debt and optionally release collateral","operationId":"burnStablecoin","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["account_uuid","stablecoin_code","burn_amount"],"properties":{"account_uuid":{"description":"Account UUID to burn from","type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"stablecoin_code":{"description":"Stablecoin to burn","type":"string","example":"FUSD"},"burn_amount":{"description":"Amount of stablecoin to burn (in smallest unit)","type":"integer","example":50000},"collateral_release_amount":{"description":"Specific amount of collateral to release. If not provided, proportional amount will be released","type":"integer","example":75000}},"type":"object"}}}},"responses":{"200":{"description":"Stablecoin burned successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Stablecoin burned successfully"},"data":{"properties":{"position_uuid":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"account_uuid":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"stablecoin_code":{"type":"string","example":"FUSD"},"collateral_amount":{"type":"integer","example":75000},"debt_amount":{"type":"integer","example":50000},"collateral_ratio":{"type":"string","example":"1.5000"},"status":{"type":"string","example":"active"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Bad request","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ValidationError"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v2\/stablecoin-operations\/add-collateral":{"post":{"tags":["Stablecoin Operations"],"summary":"Add collateral to an existing position","description":"Increase collateral to improve position health and collateral ratio","operationId":"addCollateral","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["account_uuid","stablecoin_code","collateral_asset_code","collateral_amount"],"properties":{"account_uuid":{"description":"Account UUID","type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"stablecoin_code":{"description":"Stablecoin code","type":"string","example":"FUSD"},"collateral_asset_code":{"description":"Collateral asset code","type":"string","example":"USD"},"collateral_amount":{"description":"Amount of collateral to add (in smallest unit)","type":"integer","example":50000}},"type":"object"}}}},"responses":{"200":{"description":"Collateral added successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Collateral added successfully"},"data":{"properties":{"position_uuid":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"collateral_amount":{"type":"integer","example":200000},"debt_amount":{"type":"integer","example":100000},"collateral_ratio":{"type":"string","example":"2.0000"},"health_improved":{"type":"boolean","example":true}},"type":"object"}},"type":"object"}}}},"400":{"description":"Bad request","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ValidationError"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v2\/stablecoin-operations\/accounts\/{accountUuid}\/positions":{"get":{"tags":["Stablecoin Operations"],"summary":"Get account's stablecoin positions","description":"Retrieve all collateral positions for a specific account","operationId":"getAccountPositions","parameters":[{"name":"accountUuid","in":"path","description":"Account UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"uuid":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"stablecoin_code":{"type":"string","example":"FUSD"},"collateral_asset_code":{"type":"string","example":"USD"},"collateral_amount":{"type":"integer","example":150000},"debt_amount":{"type":"integer","example":100000},"collateral_ratio":{"type":"string","example":"1.5000"},"liquidation_price":{"type":"string","example":"0.80000000"},"status":{"type":"string","example":"active"},"health_score":{"type":"number","example":0.75},"recommendations":{"type":"array","items":{"type":"object"}}},"type":"object"}}},"type":"object"}}}},"404":{"description":"Account not found","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v2\/stablecoin-operations\/positions\/{positionUuid}":{"get":{"tags":["Stablecoin Operations"],"summary":"Get position details with recommendations","description":"Retrieve detailed information about a specific collateral position including health metrics and recommendations","operationId":"getPositionDetails","parameters":[{"name":"positionUuid","in":"path","description":"Position UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"uuid":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"account_uuid":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"stablecoin_code":{"type":"string","example":"FUSD"},"collateral_asset_code":{"type":"string","example":"USD"},"collateral_amount":{"type":"integer","example":150000},"debt_amount":{"type":"integer","example":100000},"collateral_ratio":{"type":"string","example":"1.5000"},"health_score":{"type":"number","example":0.75},"max_mint_amount":{"type":"integer","example":25000},"liquidation_price":{"type":"string","example":"0.80000000"},"is_at_risk":{"type":"boolean","example":false},"recommendations":{"type":"array","items":{"properties":{"action":{"type":"string","example":"mint_more"},"urgency":{"type":"string","example":"low"},"message":{"type":"string","example":"Position is over-collateralized, you can mint more stablecoins"},"max_mint_amount":{"type":"integer","example":25000}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"404":{"description":"Position not found","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v2\/stablecoin-operations\/liquidation-opportunities":{"get":{"tags":["Stablecoin Operations"],"summary":"Get liquidation opportunities","description":"Retrieve positions eligible for liquidation with potential rewards","operationId":"getLiquidationOpportunities","parameters":[{"name":"limit","in":"query","description":"Number of opportunities to return (default: 50)","required":false,"schema":{"type":"integer","default":50}},{"name":"stablecoin_code","in":"query","description":"Filter by stablecoin code","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"position_uuid":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"account_uuid":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"stablecoin_code":{"type":"string","example":"FUSD"},"eligible":{"type":"boolean","example":true},"reward":{"type":"integer","example":5000},"penalty":{"type":"integer","example":10000},"collateral_seized":{"type":"integer","example":100000},"debt_amount":{"type":"integer","example":90000},"collateral_asset":{"type":"string","example":"USD"},"current_ratio":{"type":"string","example":"1.1000"},"min_ratio":{"type":"string","example":"1.2000"},"priority_score":{"type":"number","example":0.85},"health_score":{"type":"number","example":0.1}},"type":"object"}}},"type":"object"}}}}}}},"\/api\/v2\/stablecoin-operations\/positions\/{positionUuid}\/liquidate":{"post":{"tags":["Stablecoin Operations"],"summary":"Liquidate a specific position","description":"Execute liquidation on an eligible collateral position","operationId":"liquidatePosition","parameters":[{"name":"positionUuid","in":"path","description":"Position UUID to liquidate","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Position liquidated successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Position liquidated successfully"},"data":{"properties":{"position_uuid":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"liquidated_debt":{"type":"integer","example":90000},"liquidated_collateral":{"type":"integer","example":100000},"penalty_amount":{"type":"integer","example":10000},"liquidator_reward":{"type":"integer","example":5000},"protocol_fee":{"type":"integer","example":5000},"returned_to_owner":{"type":"integer","example":90000},"liquidator_uuid":{"type":"string","format":"uuid","example":"456e7890-e89b-12d3-a456-426614174001"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Bad request - Position not eligible for liquidation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"Position not found","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v2\/stablecoin-operations\/positions\/{positionUuid}\/liquidation-reward":{"get":{"tags":["Stablecoin Operations"],"summary":"Calculate potential liquidation reward for a position","description":"Calculate the potential reward for liquidating a specific position","operationId":"calculateLiquidationReward","parameters":[{"name":"positionUuid","in":"path","description":"Position UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"eligible":{"type":"boolean","example":true},"reward":{"type":"integer","example":5000},"penalty":{"type":"integer","example":10000},"collateral_seized":{"type":"integer","example":100000},"debt_amount":{"type":"integer","example":90000},"collateral_asset":{"type":"string","example":"USD"},"current_ratio":{"type":"string","example":"1.1000"},"min_ratio":{"type":"string","example":"1.2000"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Position not found","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v2\/stablecoin-operations\/stablecoins\/{stablecoinCode}\/simulate-liquidation":{"post":{"tags":["Stablecoin Operations"],"summary":"Simulate mass liquidation scenario","description":"Simulate the impact of a price drop on collateral positions","operationId":"simulateMassLiquidation","parameters":[{"name":"stablecoinCode","in":"path","description":"Stablecoin code","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["price_drop_percentage"],"properties":{"price_drop_percentage":{"description":"Price drop percentage (0-1)","type":"number","example":0.2,"maximum":1,"minimum":0}},"type":"object"}}}},"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"stablecoin_code":{"type":"string","example":"FUSD"},"price_drop_percentage":{"type":"integer","example":20},"total_positions":{"type":"integer","example":25},"positions_liquidated":{"type":"integer","example":8},"liquidation_impact_percentage":{"type":"integer","example":32},"total_collateral_seized":{"type":"integer","example":800000},"total_debt_liquidated":{"type":"integer","example":720000},"detailed_results":{"type":"array","items":{"type":"object"}}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ValidationError"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v2\/stablecoin-operations\/auto-liquidate":{"post":{"tags":["Stablecoin Operations"],"summary":"Execute automatic liquidation for all eligible positions","description":"Automatically liquidate all positions that meet liquidation criteria","operationId":"executeAutoLiquidation","responses":{"200":{"description":"Automatic liquidation executed","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Automatic liquidation executed"},"data":{"properties":{"liquidated_count":{"type":"integer","example":3},"failed_count":{"type":"integer","example":0},"total_liquidator_reward":{"type":"integer","example":15000},"total_protocol_fees":{"type":"integer","example":15000},"results":{"type":"array","items":{"type":"object"}}},"type":"object"}},"type":"object"}}}},"400":{"description":"Bad request","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v2\/stablecoin-operations\/positions-at-risk":{"get":{"tags":["Stablecoin Operations"],"summary":"Get positions at risk of liquidation","description":"Retrieve positions that are close to liquidation threshold","operationId":"getPositionsAtRisk","parameters":[{"name":"buffer_ratio","in":"query","description":"Risk buffer ratio (default: 0.05)","required":false,"schema":{"type":"number","default":0.05}},{"name":"stablecoin_code","in":"query","description":"Filter by stablecoin code","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"uuid":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"account_uuid":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"stablecoin_code":{"type":"string","example":"FUSD"},"collateral_ratio":{"type":"string","example":"1.2500"},"health_score":{"type":"number","example":0.25},"risk_level":{"type":"string","example":"high","enum":["low","medium","high","critical"]},"recommendations":{"type":"array","items":{"properties":{"action":{"type":"string","example":"add_collateral"},"urgency":{"type":"string","example":"high"},"suggested_amount":{"type":"integer","example":25000}},"type":"object"}}},"type":"object"}}},"type":"object"}}}}}}},"\/api\/stablecoins\/operations\/mint":{"post":{"tags":["Stablecoin Operations (Stub)"],"summary":"Mint stablecoins","description":"Mints new stablecoins with collateral","operationId":"stablecoinOperationsStubMint","responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/stablecoins\/operations\/burn":{"post":{"tags":["Stablecoin Operations (Stub)"],"summary":"Burn stablecoins","description":"Burns stablecoins and returns collateral","operationId":"stablecoinOperationsStubBurn","responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/stablecoins\/operations\/collateral\/add":{"post":{"tags":["Stablecoin Operations (Stub)"],"summary":"Add collateral to position","description":"Adds collateral to an existing position","operationId":"stablecoinOperationsStubAddCollateral","responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/stablecoins\/operations\/positions\/{accountUuid}":{"get":{"tags":["Stablecoin Operations (Stub)"],"summary":"Get account positions","description":"Returns stablecoin positions for an account","operationId":"stablecoinOperationsStubGetAccountPositions","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/stablecoins\/operations\/positions\/at-risk":{"get":{"tags":["Stablecoin Operations (Stub)"],"summary":"Get positions at risk","description":"Returns positions at risk of liquidation","operationId":"stablecoinOperationsStubGetPositionsAtRisk","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/stablecoins\/operations\/positions\/{positionUuid}\/details":{"get":{"tags":["Stablecoin Operations (Stub)"],"summary":"Get position details","description":"Returns details for a specific position","operationId":"stablecoinOperationsStubGetPositionDetails","parameters":[{"name":"positionUuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/stablecoins\/operations\/liquidation\/opportunities":{"get":{"tags":["Stablecoin Operations (Stub)"],"summary":"Get liquidation opportunities","description":"Returns available liquidation opportunities","operationId":"stablecoinOperationsStubGetLiquidationOpportunities","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/stablecoins\/operations\/liquidation\/auto":{"post":{"tags":["Stablecoin Operations (Stub)"],"summary":"Execute auto-liquidation","description":"Executes automatic liquidation of at-risk positions","operationId":"stablecoinOperationsStubExecuteAutoLiquidation","responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/stablecoins\/operations\/liquidation\/{positionUuid}":{"post":{"tags":["Stablecoin Operations (Stub)"],"summary":"Liquidate a position","description":"Liquidates a specific position","operationId":"stablecoinOperationsStubLiquidatePosition","parameters":[{"name":"positionUuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/stablecoins\/operations\/liquidation\/{positionUuid}\/reward":{"get":{"tags":["Stablecoin Operations (Stub)"],"summary":"Calculate liquidation reward","description":"Calculates expected reward for liquidating a position","operationId":"stablecoinOperationsStubCalculateLiquidationReward","parameters":[{"name":"positionUuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/stablecoins\/operations\/liquidation\/simulate\/{stablecoinCode}":{"post":{"tags":["Stablecoin Operations (Stub)"],"summary":"Simulate mass liquidation","description":"Simulates mass liquidation scenario with price drop","operationId":"stablecoinOperationsStubSimulateMassLiquidation","parameters":[{"name":"stablecoinCode","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/sub-products":{"get":{"tags":["Sub-Products"],"summary":"Get all sub-product statuses","description":"Returns status of all sub-products","operationId":"subProductsIndex","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/sub-products\/{subProduct}":{"get":{"tags":["Sub-Products"],"summary":"Get specific sub-product status","description":"Returns the status of a specific sub-product","operationId":"subProductsShow","parameters":[{"name":"subProduct","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/sub-products\/enabled":{"get":{"tags":["Sub-Products"],"summary":"Get enabled sub-products","description":"Returns sub-products enabled for the current user","operationId":"subProductsEnabled","responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/accounts\/{uuid}\/deposit":{"post":{"tags":["Transactions"],"summary":"Deposit money to an account","description":"Deposits money into a specified account","operationId":"depositToAccount","parameters":[{"name":"uuid","in":"path","description":"Account UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["amount"],"properties":{"amount":{"description":"Amount in cents","type":"integer","example":10000,"minimum":1},"description":{"type":"string","example":"Monthly salary","maxLength":255}},"type":"object"}}}},"responses":{"200":{"description":"Deposit successful","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"account_uuid":{"type":"string","format":"uuid"},"new_balance":{"type":"integer","example":60000},"amount_deposited":{"type":"integer","example":10000},"transaction_type":{"type":"string","example":"deposit"}},"type":"object"},"message":{"type":"string","example":"Deposit successful"}},"type":"object"}}}},"422":{"description":"Cannot deposit to frozen account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"Account not found","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"sanctum":[]}]}},"\/api\/accounts\/{uuid}\/withdraw":{"post":{"tags":["Transactions"],"summary":"Withdraw money from an account","description":"Withdraws money from a specified account","operationId":"withdrawFromAccount","parameters":[{"name":"uuid","in":"path","description":"Account UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["amount"],"properties":{"amount":{"description":"Amount in cents","type":"integer","example":5000,"minimum":1},"description":{"type":"string","example":"ATM withdrawal","maxLength":255}},"type":"object"}}}},"responses":{"200":{"description":"Withdrawal successful","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"account_uuid":{"type":"string","format":"uuid"},"new_balance":{"type":"integer","example":45000},"amount_withdrawn":{"type":"integer","example":5000},"transaction_type":{"type":"string","example":"withdrawal"}},"type":"object"},"message":{"type":"string","example":"Withdrawal successful"}},"type":"object"}}}},"422":{"description":"Insufficient balance or frozen account","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"Account not found","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"sanctum":[]}]}},"\/api\/accounts\/{uuid}\/transactions":{"get":{"tags":["Transactions"],"summary":"Get transaction history for an account","description":"Retrieves paginated transaction history from event store","operationId":"getAccountTransactions","parameters":[{"name":"uuid","in":"path","description":"Account UUID","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"type","in":"query","description":"Filter by transaction type","required":false,"schema":{"type":"string","enum":["credit","debit"]}},{"name":"asset_code","in":"query","description":"Filter by asset code","required":false,"schema":{"type":"string","example":"USD"}},{"name":"per_page","in":"query","description":"Items per page","required":false,"schema":{"type":"integer","default":50,"maximum":100,"minimum":1}}],"responses":{"200":{"description":"Transaction history retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Transaction"}},"meta":{"type":"object"}},"type":"object"}}}},"404":{"description":"Account not found","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"sanctum":[]}]}},"\/api\/transaction-monitoring":{"get":{"tags":["Transaction Monitoring"],"summary":"Get monitored transactions","description":"Retrieve transactions that are being monitored for compliance","operationId":"getMonitoredTransactions","parameters":[{"name":"status","in":"query","description":"Filter by status","required":false,"schema":{"type":"string","enum":["pending","reviewing","cleared","flagged"]}},{"name":"risk_level","in":"query","description":"Filter by risk level","required":false,"schema":{"type":"string","enum":["low","medium","high","critical"]}},{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer","default":1}}],"responses":{"200":{"description":"List of monitored transactions","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/transaction-monitoring\/{id}":{"get":{"tags":["Transaction Monitoring"],"summary":"Get transaction monitoring details","description":"Retrieve detailed monitoring information for a specific transaction","operationId":"getTransactionDetails","parameters":[{"name":"id","in":"path","description":"Transaction ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Transaction monitoring details","content":{"application\/json":{"schema":[]}}},"404":{"description":"Transaction not found"}},"security":[{"sanctum":[]}]}},"\/api\/transaction-monitoring\/{id}\/flag":{"post":{"tags":["Transaction Monitoring"],"summary":"Flag a transaction","description":"Flag a transaction for compliance review","operationId":"flagTransaction","parameters":[{"name":"id","in":"path","description":"Transaction ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"reason":{"description":"Reason for flagging","type":"string"},"severity":{"type":"string","enum":["low","medium","high","critical"]},"notes":{"description":"Additional notes","type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Transaction flagged successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/transaction-monitoring\/{id}\/clear":{"post":{"tags":["Transaction Monitoring"],"summary":"Clear a transaction","description":"Clear a transaction from compliance monitoring","operationId":"clearTransaction","parameters":[{"name":"id","in":"path","description":"Transaction ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"reason":{"description":"Reason for clearing","type":"string"},"reviewer":{"description":"Reviewer ID","type":"string"},"notes":{"description":"Additional notes","type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Transaction cleared successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/transaction-monitoring\/rules":{"get":{"tags":["Transaction Monitoring"],"summary":"Get monitoring rules","description":"Retrieve all transaction monitoring rules","operationId":"getMonitoringRules","responses":{"200":{"description":"List of monitoring rules","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]},"post":{"tags":["Transaction Monitoring"],"summary":"Create monitoring rule","description":"Create a new transaction monitoring rule","operationId":"createMonitoringRule","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name","type","conditions","severity"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"conditions":{"type":"object"},"threshold":{"type":"number"},"severity":{"type":"string","enum":["low","medium","high","critical"]}},"type":"object"}}}},"responses":{"201":{"description":"Rule created successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/transaction-monitoring\/rules\/{id}":{"put":{"tags":["Transaction Monitoring"],"summary":"Update monitoring rule","description":"Update an existing transaction monitoring rule","operationId":"updateMonitoringRule","parameters":[{"name":"id","in":"path","description":"Rule ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":[]}}},"responses":{"200":{"description":"Rule updated successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]},"delete":{"tags":["Transaction Monitoring"],"summary":"Delete monitoring rule","description":"Delete a transaction monitoring rule","operationId":"deleteMonitoringRule","parameters":[{"name":"id","in":"path","description":"Rule ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Rule deleted successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/transaction-monitoring\/patterns":{"get":{"tags":["Transaction Monitoring"],"summary":"Get detected patterns","description":"Retrieve patterns detected in transaction monitoring","operationId":"getDetectedPatterns","parameters":[{"name":"type","in":"query","description":"Pattern type filter","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of detected patterns","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/transaction-monitoring\/thresholds":{"get":{"tags":["Transaction Monitoring"],"summary":"Get monitoring thresholds","description":"Retrieve current transaction monitoring thresholds","operationId":"getMonitoringThresholds","responses":{"200":{"description":"Current monitoring thresholds","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]},"put":{"tags":["Transaction Monitoring"],"summary":"Update monitoring thresholds","description":"Update transaction monitoring thresholds","operationId":"updateMonitoringThresholds","requestBody":{"required":true,"content":{"application\/json":{"schema":[]}}},"responses":{"200":{"description":"Thresholds updated successfully","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/transaction-monitoring\/analyze\/realtime":{"post":{"tags":["Transaction Monitoring"],"summary":"Analyze transaction in real-time","description":"Perform real-time analysis of a transaction","operationId":"analyzeTransactionRealtime","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["transaction_id"],"properties":{"transaction_id":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Analysis completed","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/transaction-monitoring\/analyze\/batch":{"post":{"tags":["Transaction Monitoring"],"summary":"Analyze transactions in batch","description":"Perform batch analysis of multiple transactions","operationId":"analyzeTransactionBatch","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["transaction_ids"],"properties":{"transaction_ids":{"type":"array","items":{"type":"string"}}},"type":"object"}}}},"responses":{"200":{"description":"Batch analysis started","content":{"application\/json":{"schema":[]}}}},"security":[{"sanctum":[]}]}},"\/api\/transaction-monitoring\/analysis\/{analysisId}":{"get":{"tags":["Transaction Monitoring"],"summary":"Get analysis status","description":"Get the status of a batch analysis","operationId":"getAnalysisStatus","parameters":[{"name":"analysisId","in":"path","description":"Analysis ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Analysis status","content":{"application\/json":{"schema":[]}}},"404":{"description":"Analysis not found"}},"security":[{"sanctum":[]}]}},"\/api\/accounts\/{uuid}\/transactions\/reverse":{"post":{"tags":["Transaction Reversal"],"summary":"Reverse a transaction","description":"Reverse a completed transaction with audit trail for error recovery","operationId":"71d326429bda82ab4a00b5855abf0557","parameters":[{"name":"uuid","in":"path","description":"Account UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["amount","asset_code","transaction_type","reversal_reason"],"properties":{"amount":{"type":"number","format":"float","example":100.5,"minimum":0.01},"asset_code":{"type":"string","example":"USD"},"transaction_type":{"type":"string","example":"debit","enum":["debit","credit"]},"reversal_reason":{"type":"string","example":"Unauthorized transaction"},"original_transaction_id":{"type":"string","example":"txn_123456789"},"authorized_by":{"type":"string","example":"manager@example.com"}},"type":"object"}}}},"responses":{"200":{"description":"Transaction reversal initiated successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Transaction reversal initiated successfully"},"data":{"properties":{"reversal_id":{"type":"string","example":"rev_987654321"},"account_uuid":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"amount":{"type":"number","example":100.5},"asset_code":{"type":"string","example":"USD"},"transaction_type":{"type":"string","example":"debit"},"reversal_reason":{"type":"string","example":"Unauthorized transaction"},"status":{"type":"string","example":"initiated"},"created_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"403":{"description":"Forbidden - Account does not belong to user"},"404":{"description":"Account not found"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/api\/accounts\/{uuid}\/transactions\/reversals":{"get":{"tags":["Transaction Reversal"],"summary":"Get transaction reversal history","description":"Get list of transaction reversals for an account","operationId":"34b8098ea2d0d3aac1624f1ca69adcca","parameters":[{"name":"uuid","in":"path","description":"Account UUID","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","description":"Number of results to return","schema":{"type":"integer","default":20,"maximum":100,"minimum":1}},{"name":"offset","in":"query","description":"Number of results to skip","schema":{"type":"integer","default":0,"minimum":0}}],"responses":{"200":{"description":"Reversal history retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"reversal_id":{"type":"string","example":"rev_987654321"},"amount":{"type":"number","example":100.5},"asset_code":{"type":"string","example":"USD"},"transaction_type":{"type":"string","example":"debit"},"reversal_reason":{"type":"string","example":"Unauthorized transaction"},"status":{"type":"string","example":"completed"},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"}},"type":"object"}},"pagination":{"properties":{"total":{"type":"integer","example":45},"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/transactions\/reversals\/{reversalId}\/status":{"get":{"tags":["Transaction Reversal"],"summary":"Get reversal status","description":"Check the status of a specific transaction reversal","operationId":"9a10109e3fecda40f50c8318670c73eb","parameters":[{"name":"reversalId","in":"path","description":"Reversal ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Reversal status retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"reversal_id":{"type":"string","example":"rev_987654321"},"status":{"type":"string","example":"completed"},"progress":{"type":"integer","example":100},"steps_completed":{"type":"array","items":{"type":"string","example":"validation"}},"error_message":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Reversal not found"}},"security":[{"bearerAuth":[]}]}},"\/api\/transfers":{"post":{"tags":["Transfers"],"summary":"Create a money transfer","description":"Transfers money from one account to another","operationId":"createTransfer","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["from_account_uuid","to_account_uuid","amount"],"properties":{"from_account_uuid":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"to_account_uuid":{"type":"string","format":"uuid","example":"660e8400-e29b-41d4-a716-446655440000"},"amount":{"description":"Amount in cents","type":"integer","example":5000,"minimum":1},"description":{"type":"string","example":"Payment for services","maxLength":255}},"type":"object"}}}},"responses":{"201":{"description":"Transfer initiated successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"transfer_uuid":{"type":"string","format":"uuid"},"from_account_uuid":{"type":"string","format":"uuid"},"to_account_uuid":{"type":"string","format":"uuid"},"amount":{"type":"integer","example":5000},"status":{"type":"string","example":"pending"}},"type":"object"},"message":{"type":"string","example":"Transfer initiated successfully"}},"type":"object"}}}},"422":{"description":"Validation error or business rule violation","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"sanctum":[]}]}},"\/api\/treasury\/portfolios":{"get":{"tags":["Treasury Portfolio"],"summary":"List portfolios for treasury","description":"Retrieves a list of portfolios for the authenticated treasury account","operationId":"listTreasuryPortfolios","parameters":[{"name":"treasury_id","in":"query","description":"Treasury ID to filter portfolios","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List of treasury portfolios","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}},"meta":{"properties":{"total":{"type":"integer"},"count":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden - insufficient treasury permissions"},"429":{"description":"Too Many Requests"}},"security":[{"sanctum":["treasury"]}]},"post":{"tags":["Treasury Portfolio"],"summary":"Create a new treasury portfolio","description":"Creates a new portfolio for treasury management with investment strategy","operationId":"createTreasuryPortfolio","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"Portfolio created successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Portfolio created successfully"}},"type":"object"}}}},"400":{"description":"Bad Request - validation errors"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden - insufficient treasury permissions"},"422":{"description":"Unprocessable Entity - validation failed"},"429":{"description":"Too Many Requests"}},"security":[{"sanctum":["treasury"]}]}},"\/api\/treasury\/portfolios\/{id}":{"get":{"tags":["Treasury Portfolio"],"summary":"Get portfolio details","description":"Retrieves detailed information about a specific treasury portfolio","operationId":"getTreasuryPortfolio","parameters":[{"name":"id","in":"path","description":"Portfolio ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Portfolio details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"type":"object"}}}},"404":{"description":"Portfolio not found"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"}},"security":[{"sanctum":["treasury"]}]},"put":{"tags":["Treasury Portfolio"],"summary":"Update portfolio strategy","description":"Updates the investment strategy for a treasury portfolio","operationId":"updateTreasuryPortfolio","parameters":[{"name":"id","in":"path","description":"Portfolio ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Portfolio updated successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Portfolio strategy updated successfully"}},"type":"object"}}}},"400":{"description":"Bad Request"},"404":{"description":"Portfolio not found"},"422":{"description":"Validation failed"}},"security":[{"sanctum":["treasury"]}]},"delete":{"tags":["Treasury Portfolio"],"summary":"Delete portfolio","description":"Soft deletes a treasury portfolio (sets status to inactive)","operationId":"deleteTreasuryPortfolio","parameters":[{"name":"id","in":"path","description":"Portfolio ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Portfolio deleted successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Portfolio deleted successfully"}},"type":"object"}}}},"404":{"description":"Portfolio not found"},"409":{"description":"Conflict - portfolio cannot be deleted"}},"security":[{"sanctum":["treasury"]}]}},"\/api\/treasury\/portfolios\/{id}\/allocate":{"post":{"tags":["Treasury Portfolio"],"summary":"Allocate assets to portfolio","description":"Allocates assets to a treasury portfolio with specified weights","operationId":"allocatePortfolioAssets","parameters":[{"name":"id","in":"path","description":"Portfolio ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Assets allocated successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"},"message":{"type":"string","example":"Assets allocated successfully"}},"type":"object"}}}}},"security":[{"sanctum":["treasury"]}]}},"\/api\/treasury\/portfolios\/{id}\/allocations":{"get":{"tags":["Treasury Portfolio"],"summary":"Get current asset allocations","description":"Retrieves current asset allocation details for a portfolio","operationId":"getPortfolioAllocations","parameters":[{"name":"id","in":"path","description":"Portfolio ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Current asset allocations","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"allocations":{"type":"array","items":{"type":"object"}},"total_value":{"type":"number","format":"float"},"last_updated":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":["treasury"]}]}},"\/api\/treasury\/portfolios\/{id}\/rebalance":{"post":{"tags":["Treasury Portfolio"],"summary":"Trigger portfolio rebalancing","description":"Initiates rebalancing workflow for a treasury portfolio","operationId":"triggerPortfolioRebalancing","parameters":[{"name":"id","in":"path","description":"Portfolio ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Rebalancing workflow started","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"workflow_id":{"type":"string"},"status":{"type":"string","example":"started"}},"type":"object"},"message":{"type":"string","example":"Rebalancing workflow started"}},"type":"object"}}}}},"security":[{"sanctum":["treasury"]}]}},"\/api\/treasury\/portfolios\/{id}\/rebalancing-plan":{"get":{"tags":["Treasury Portfolio"],"summary":"Get rebalancing plan","description":"Calculates and returns the rebalancing plan for a portfolio","operationId":"getRebalancingPlan","parameters":[{"name":"id","in":"path","description":"Portfolio ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Rebalancing plan details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":["treasury"]}]}},"\/api\/treasury\/portfolios\/{id}\/approve-rebalancing":{"post":{"tags":["Treasury Portfolio"],"summary":"Approve rebalancing execution","description":"Approves and executes a portfolio rebalancing plan","operationId":"approvePortfolioRebalancing","parameters":[{"name":"id","in":"path","description":"Portfolio ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Rebalancing approved and executed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Rebalancing executed successfully"}},"type":"object"}}}}},"security":[{"sanctum":["treasury"]}]}},"\/api\/treasury\/portfolios\/{id}\/performance":{"get":{"tags":["Treasury Portfolio"],"summary":"Get performance metrics","description":"Retrieves performance metrics and analytics for a portfolio","operationId":"getPortfolioPerformance","parameters":[{"name":"id","in":"path","description":"Portfolio ID","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"period","in":"query","description":"Performance period","required":false,"schema":{"type":"string","default":"30d","enum":["1d","7d","30d","90d","1y","ytd","all"]}}],"responses":{"200":{"description":"Portfolio performance metrics","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":["treasury"]}]}},"\/api\/treasury\/portfolios\/{id}\/valuation":{"get":{"tags":["Treasury Portfolio"],"summary":"Get current portfolio valuation","description":"Retrieves real-time valuation of portfolio assets","operationId":"getPortfolioValuation","parameters":[{"name":"id","in":"path","description":"Portfolio ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Portfolio valuation details","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":["treasury"]}]}},"\/api\/treasury\/portfolios\/{id}\/history":{"get":{"tags":["Treasury Portfolio"],"summary":"Get portfolio historical data","description":"Retrieves historical performance and rebalancing data","operationId":"getPortfolioHistory","parameters":[{"name":"id","in":"path","description":"Portfolio ID","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"type","in":"query","description":"Type of historical data","required":false,"schema":{"type":"string","default":"all","enum":["rebalancing","performance","all"]}}],"responses":{"200":{"description":"Portfolio historical data","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":["treasury"]}]}},"\/api\/treasury\/portfolios\/{id}\/reports":{"get":{"tags":["Treasury Portfolio"],"summary":"List portfolio reports","description":"Retrieves a list of generated reports for a portfolio","operationId":"listPortfolioReports","parameters":[{"name":"id","in":"path","description":"Portfolio ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List of portfolio reports","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}}},"security":[{"sanctum":["treasury"]}]},"post":{"tags":["Treasury Portfolio"],"summary":"Generate portfolio report","description":"Generates a comprehensive report for a treasury portfolio","operationId":"generatePortfolioReport","parameters":[{"name":"id","in":"path","description":"Portfolio ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object"}}}},"responses":{"202":{"description":"Report generation started","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"workflow_id":{"type":"string"},"status":{"type":"string","example":"started"}},"type":"object"},"message":{"type":"string","example":"Report generation started"}},"type":"object"}}}}},"security":[{"sanctum":["treasury"]}]}},"\/api\/v1\/trustcert\/applications":{"post":{"tags":["TrustCert"],"summary":"Create a new certificate application","description":"Creates a new trust certificate application for the authenticated user. Only one active application is allowed at a time.","operationId":"trustCertApplicationCreate","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["target_level"],"properties":{"target_level":{"description":"The target trust level to apply for","type":"string","example":"verified","enum":["basic","verified","high","ultimate"]}},"type":"object"}}}},"responses":{"201":{"description":"Application created successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"id":{"type":"string","example":"app_abc123def456"},"user_id":{"type":"integer","example":1},"target_level":{"type":"string","example":"verified"},"status":{"type":"string","example":"draft"},"requirements":{"type":"array","items":{"type":"string"}},"documents":{"type":"array","items":{"type":"object"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"submitted_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}},"type":"object"}}}},"409":{"description":"An active application already exists","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"APPLICATION_EXISTS"},"message":{"type":"string","example":"An active application already exists."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/trustcert\/applications\/{id}":{"get":{"tags":["TrustCert"],"summary":"Get a specific certificate application","description":"Retrieves a specific trust certificate application by its ID for the authenticated user.","operationId":"trustCertApplicationShow","parameters":[{"name":"id","in":"path","description":"The application ID","required":true,"schema":{"type":"string","example":"app_abc123def456"}}],"responses":{"200":{"description":"Application retrieved successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"id":{"type":"string","example":"app_abc123def456"},"user_id":{"type":"integer","example":1},"target_level":{"type":"string","example":"verified"},"status":{"type":"string","example":"draft"},"requirements":{"type":"array","items":{"type":"string"}},"documents":{"type":"array","items":{"type":"object"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"submitted_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}},"type":"object"}}}},"404":{"description":"Application not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"APPLICATION_NOT_FOUND"},"message":{"type":"string","example":"Application not found."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/trustcert\/applications\/current":{"get":{"tags":["TrustCert"],"summary":"Get current active certificate application","description":"Returns the authenticated user's current active trust certificate application, or null if none exists.","operationId":"trustCertApplicationCurrent","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"id":{"type":"string","example":"app_abc123def456"},"user_id":{"type":"integer","example":1},"target_level":{"type":"string","example":"verified"},"status":{"type":"string","example":"draft"},"requirements":{"type":"array","items":{"type":"string"}},"documents":{"type":"array","items":{"type":"object"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"submitted_at":{"type":"string","format":"date-time","nullable":true}},"type":"object","nullable":true}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/trustcert\/applications\/{id}\/documents":{"post":{"tags":["TrustCert"],"summary":"Upload documents for a certificate application","description":"Uploads a document to the specified certificate application. The application must be in draft status.","operationId":"trustCertApplicationUploadDocuments","parameters":[{"name":"id","in":"path","description":"The application ID","required":true,"schema":{"type":"string","example":"app_abc123def456"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["document_type","file_name"],"properties":{"document_type":{"description":"The type of document being uploaded","type":"string","example":"identity","enum":["identity","address","kyc","audit"]},"file_name":{"description":"The name of the uploaded file","type":"string","example":"passport_scan.pdf"}},"type":"object"}}}},"responses":{"201":{"description":"Document uploaded successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"id":{"type":"string","example":"doc_abc123def456"},"document_type":{"type":"string","example":"identity"},"file_name":{"type":"string","example":"passport_scan.pdf"},"uploaded_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Application not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"APPLICATION_NOT_FOUND"},"message":{"type":"string","example":"Application not found."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Application is not editable or validation error","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"APPLICATION_NOT_EDITABLE"},"message":{"type":"string","example":"Application is not in a draft state."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/trustcert\/applications\/{id}\/submit":{"post":{"tags":["TrustCert"],"summary":"Submit a certificate application for review","description":"Submits a draft certificate application for review. Only applications in draft status can be submitted.","operationId":"trustCertApplicationSubmit","parameters":[{"name":"id","in":"path","description":"The application ID","required":true,"schema":{"type":"string","example":"app_abc123def456"}}],"responses":{"200":{"description":"Application submitted successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"id":{"type":"string","example":"app_abc123def456"},"user_id":{"type":"integer","example":1},"target_level":{"type":"string","example":"verified"},"status":{"type":"string","example":"submitted"},"requirements":{"type":"array","items":{"type":"string"}},"documents":{"type":"array","items":{"type":"object"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"submitted_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Application not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"APPLICATION_NOT_FOUND"},"message":{"type":"string","example":"Application not found."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Application is not submittable","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"APPLICATION_NOT_SUBMITTABLE"},"message":{"type":"string","example":"Only draft applications can be submitted."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/trustcert\/applications\/{id}\/cancel":{"post":{"tags":["TrustCert"],"summary":"Cancel a certificate application","description":"Cancels a pending certificate application. Applications that are already approved or cancelled cannot be cancelled.","operationId":"trustCertApplicationCancel","parameters":[{"name":"id","in":"path","description":"The application ID","required":true,"schema":{"type":"string","example":"app_abc123def456"}}],"responses":{"200":{"description":"Application cancelled successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"id":{"type":"string","example":"app_abc123def456"},"user_id":{"type":"integer","example":1},"target_level":{"type":"string","example":"verified"},"status":{"type":"string","example":"cancelled"},"requirements":{"type":"array","items":{"type":"string"}},"documents":{"type":"array","items":{"type":"object"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"submitted_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}},"type":"object"}}}},"404":{"description":"Application not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"APPLICATION_NOT_FOUND"},"message":{"type":"string","example":"Application not found."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Application cannot be cancelled","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"APPLICATION_NOT_CANCELLABLE"},"message":{"type":"string","example":"This application cannot be cancelled."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/trustcert\/{certId}\/certificate":{"get":{"tags":["TrustCert Certificates"],"summary":"Get certificate details","description":"Returns detailed information about a TrustCert certificate","operationId":"trustCertCertificatesShow","parameters":[{"name":"certId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/trustcert\/{certId}\/export-pdf":{"post":{"tags":["TrustCert Certificates"],"summary":"Export certificate as PDF","description":"Exports a TrustCert certificate as a PDF document","operationId":"trustCertCertificatesExportPdf","parameters":[{"name":"certId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Successful operation"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/trustcert\/current":{"get":{"tags":["TrustCert"],"summary":"Get current trust certificate","description":"Returns the authenticated user's current trust certificate status and trust level information.","operationId":"trustCertCurrent","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"trust_level":{"type":"string","example":"verified"},"label":{"type":"string","example":"Verified"},"numeric_value":{"type":"integer","example":2},"certificate":{"type":"object","nullable":true},"is_valid":{"type":"boolean","example":true},"expires_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/trustcert\/requirements":{"get":{"tags":["TrustCert"],"summary":"Get all trust level requirements","description":"Returns all trust levels with their requirements and associated transaction limits.","operationId":"trustCertRequirements","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"level":{"type":"integer","example":2},"name":{"type":"string","example":"Verified"},"description":{"type":"string","example":"Full identity and address verification"},"dailyLimit":{"type":"number","example":10000},"monthlyLimit":{"type":"number","example":50000},"requirements":{"type":"array","items":{"type":"string"}},"documents":{"type":"array","items":{"type":"string"}}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/trustcert\/requirements\/{level}":{"get":{"tags":["TrustCert"],"summary":"Get requirements for a specific trust level","description":"Returns the requirements and transaction limits for a specific trust level. Accepts both string names (basic, verified, high, ultimate) and numeric values (0-4).","operationId":"trustCertRequirementsByLevel","parameters":[{"name":"level","in":"path","description":"The trust level (string name or numeric value 0-4)","required":true,"schema":{"type":"string","example":"verified","enum":["unknown","basic","verified","high","ultimate","0","1","2","3","4"]}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"level":{"type":"string","example":"verified"},"label":{"type":"string","example":"Verified"},"numeric_value":{"type":"integer","example":2},"requirements":{"type":"array","items":{"type":"string"}},"limits":{"properties":{"daily":{"type":"number","example":5000},"monthly":{"type":"number","example":50000},"single":{"type":"number","example":2000}},"type":"object"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Invalid trust level","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"INVALID_TRUST_LEVEL"},"message":{"type":"string","example":"Trust level not found."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/trustcert\/limits":{"get":{"tags":["TrustCert"],"summary":"Get transaction limits for all trust levels","description":"Returns the transaction limits (daily, monthly, single) for each trust level.","operationId":"trustCertLimits","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"level":{"type":"string","example":"verified"},"label":{"type":"string","example":"Verified"},"limits":{"properties":{"daily":{"type":"number","example":5000},"monthly":{"type":"number","example":50000},"single":{"type":"number","example":2000}},"type":"object"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/trustcert\/check-limit":{"post":{"tags":["TrustCert"],"summary":"Check transaction limit against trust level","description":"Checks whether a given transaction amount is within the authenticated user's trust level limits.","operationId":"trustCertCheckLimit","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["amount","transaction_type"],"properties":{"amount":{"description":"The transaction amount to check","type":"number","example":1500},"transaction_type":{"description":"The type of transaction limit to check against","type":"string","example":"single","enum":["daily","monthly","single"]}},"type":"object"}}}},"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"allowed":{"type":"boolean","example":true},"trust_level":{"type":"string","example":"verified"},"limit":{"type":"number","example":2000},"amount":{"type":"number","example":1500},"type":{"type":"string","example":"single"},"remaining":{"type":"number","example":500},"upgrade_required":{"description":"Next trust level needed to increase limits, null if already at max","type":"string","example":"high","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/trustcert\/{certificateId}\/present":{"post":{"tags":["TrustCert Presentation"],"summary":"Generate verifiable presentation","description":"Generate a verifiable presentation for a certificate.\n\nCreates a time-limited token that can be shared via QR code or deep link\nto prove certificate ownership without revealing PII.","operationId":"f932ca8447374b79ed858daace319a38","parameters":[{"name":"certificateId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"requested_claims":{"type":"array","items":{"type":"string"},"example":["certificate_type","valid_until"]},"validity_minutes":{"type":"integer","example":15}},"type":"object"}}}},"responses":{"200":{"description":"Presentation generated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"presentation_token":{"type":"string"},"qr_code_data":{"type":"string"},"deep_link":{"type":"string"},"verification_url":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"claims":{"type":"object"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid certificate"},"404":{"description":"Certificate not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/trustcert\/verify\/{token}":{"get":{"tags":["TrustCert Presentation"],"summary":"Verify presentation token","description":"Verify a presentation token.\n\nThis endpoint can be called without authentication to verify a presentation\nshared via QR code or deep link.","operationId":"3680c66eaf3eddfded0e29f73bce4f8e","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Verification result","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean"},"data":{"properties":{"valid":{"type":"boolean"},"certificate_type":{"type":"string","nullable":true},"trust_level":{"type":"string","nullable":true},"claims":{"type":"object"},"issuer":{"type":"string","nullable":true},"expires_at":{"type":"string","format":"date-time","nullable":true},"error":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}}}}},"\/api\/v1\/users\/avatar":{"post":{"tags":["User"],"summary":"Upload user avatar","description":"Upload or replace user avatar.","operationId":"uploadAvatar","requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"required":["avatar"],"properties":{"avatar":{"description":"Image file (jpg, png, webp, max 2MB)","type":"string","format":"binary"}},"type":"object"}}}},"responses":{"200":{"description":"Avatar uploaded"},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]},"delete":{"tags":["User"],"summary":"Remove user avatar","description":"Remove user avatar.","operationId":"deleteAvatar","responses":{"200":{"description":"Avatar removed"},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/voting\/polls":{"get":{"tags":["User Voting"],"summary":"Get polls available for voting","description":"Get all active polls with user's voting context","operationId":"5450e25994657f4d0b029671600f0874","responses":{"200":{"description":"List of voting polls","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserVotingPoll"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/voting\/polls\/upcoming":{"get":{"tags":["User Voting"],"summary":"Get upcoming polls","description":"Get polls that will become active soon","operationId":"49ddf75a6932bd0c66c0db0e2a21862e","responses":{"200":{"description":"List of upcoming polls"}},"security":[{"sanctum":[]}]}},"\/api\/voting\/polls\/history":{"get":{"tags":["User Voting"],"summary":"Get user's voting history","description":"Get all polls the user has participated in","operationId":"f48aa878738f35d16876ce73c69e5139","responses":{"200":{"description":"User's voting history"}},"security":[{"sanctum":[]}]}},"\/api\/voting\/polls\/{uuid}\/vote":{"post":{"tags":["User Voting"],"summary":"Submit vote for GCU basket composition","description":"Submit weighted allocation vote for basket composition","operationId":"a4defe7c42a9273987d21053b55d078f","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["allocations"],"properties":{"allocations":{"description":"Currency allocations (must sum to 100)","type":"object","example":{"USD":40,"EUR":30,"GBP":15,"CHF":10,"JPY":3,"XAU":2}}},"type":"object"}}}},"responses":{"201":{"description":"Vote submitted successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string"},"vote_id":{"type":"string"},"voting_power_used":{"type":"integer"}},"type":"object"}}}},"400":{"description":"Invalid vote data"},"403":{"description":"Cannot vote on this poll"},"404":{"description":"Poll not found"}},"security":[{"sanctum":[]}]}},"\/api\/voting\/dashboard":{"get":{"tags":["User Voting"],"summary":"Get voting dashboard data","description":"Get comprehensive voting dashboard information","operationId":"b3271ffb72f43753d608102d2ed56b57","responses":{"200":{"description":"Dashboard data"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/banners":{"get":{"tags":["Banners"],"summary":"List active banners for current user","operationId":"v1ListBanners","responses":{"200":{"description":"Active banners","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"subtitle":{"type":"string","nullable":true},"image_url":{"type":"string","nullable":true},"action_url":{"type":"string","nullable":true},"action_type":{"type":"string","enum":["url","screen","deeplink"]},"position":{"type":"integer"}},"type":"object"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/banners\/{id}\/dismiss":{"post":{"tags":["Banners"],"summary":"Dismiss a banner for the current user","operationId":"v1DismissBanner","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Banner dismissed"},"404":{"description":"Banner not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/user\/bridge-setup-status":{"get":{"tags":["Bridge Setup"],"summary":"Get Bridge.xyz KYC + virtual account setup status for the authenticated user","description":"Reads from local DB cache populated by Bridge webhooks; never hits Bridge synchronously.","operationId":"v1UserBridgeSetupStatus","responses":{"200":{"description":"Bridge setup state","content":{"application\/json":{"schema":{"properties":{"kycStatus":{"type":"string","example":"not_started","enum":["not_started","pending","approved","rejected"]},"virtualAccountReady":{"type":"boolean","example":false},"supportedRails":{"type":"array","items":{"type":"string","enum":["ach","sepa","sepa_instant"]}}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/user\/bridge-kyc-link":{"post":{"tags":["Bridge Setup"],"summary":"Issue a hosted KYC link the user opens in an in-app browser","description":"Lazily provisions the Bridge customer on first call (idempotent via Idempotency-Key: bridge_customer:{user_id}), then returns a hosted KYC link URL.","operationId":"v1UserBridgeKycLink","responses":{"200":{"description":"Hosted KYC link","content":{"application\/json":{"schema":{"properties":{"url":{"type":"string","format":"uri","example":"https:\/\/kyc.bridge.xyz\/abc123"},"expiresAt":{"type":"string","format":"date-time","nullable":true}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"409":{"description":"KYC already approved or in progress"},"501":{"description":"Provider implementation deferred"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/user\/bridge-va-provision":{"post":{"tags":["Bridge Setup"],"summary":"Trigger Bridge virtual account provisioning for the authenticated user","description":"Idempotent retry path for the ramp screen: if KYC is approved + a Polygon address exists + no VA yet, calls Bridge to provision one. Mobile calls this on screen mount when bridge-setup-status reports kycStatus=approved && !virtualAccountReady.","operationId":"v1UserBridgeVaProvision","responses":{"200":{"description":"Current VA state after the provisioning attempt. virtualAccountReady=false means Bridge is still processing OR the call failed (check \/bridge-setup-status again, listen for bridge.virtual_account.ready WS event).","content":{"application\/json":{"schema":{"properties":{"virtualAccountReady":{"type":"boolean","example":true},"supportedRails":{"type":"array","items":{"type":"string","enum":["ach","sepa","sepa_instant"]}}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"409":{"description":"KYC not approved, no Polygon address, or VA already provisioned"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/webhooks\/bridge":{"post":{"tags":["Bridge Webhooks"],"summary":"Bridge.xyz event webhook (both KYC and ramp events)","description":"Signature-verified via the X-Webhook-Signature header (RSA-SHA256 against Bridge's per-endpoint public key; legacy HMAC Bridge-Signature accepted as fallback). Dispatches by event_type to either KYC or ramp handlers.","operationId":"v1BridgeWebhook","responses":{"200":{"description":"Event accepted (or ignored as no-op)"},"401":{"description":"Invalid signature"},"400":{"description":"Invalid payload"}}}},"\/api\/v1\/monitoring\/live-dashboard":{"get":{"tags":["Monitoring"],"summary":"Get live platform metrics","operationId":"getLiveDashboard","responses":{"200":{"description":"Live metrics data"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/monitoring\/live-dashboard\/domain-health":{"get":{"tags":["Monitoring"],"summary":"Get domain health metrics","operationId":"getDomainHealth","responses":{"200":{"description":"Domain health data"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/monitoring\/live-dashboard\/event-throughput":{"get":{"tags":["Monitoring"],"summary":"Get event throughput metrics","operationId":"getEventThroughput","responses":{"200":{"description":"Event throughput data"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/monitoring\/live-dashboard\/stream-status":{"get":{"tags":["Monitoring"],"summary":"Get event stream status","operationId":"getStreamStatus","responses":{"200":{"description":"Stream status data"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/monitoring\/live-dashboard\/projector-lag":{"get":{"tags":["Monitoring"],"summary":"Get projector lag metrics","operationId":"getProjectorLag","responses":{"200":{"description":"Projector lag data"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/notifications":{"get":{"tags":["Notifications"],"summary":"List paginated notifications","operationId":"v1ListNotifications","parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"maximum":100}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["transaction","security","system","promo"]}}],"responses":{"200":{"description":"Paginated notification list","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["transaction","security","system","promo"]},"title":{"type":"string"},"body":{"type":"string"},"read":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}},"type":"object"}},"meta":{"properties":{"total":{"type":"integer"},"offset":{"type":"integer"},"limit":{"type":"integer"},"unread_count":{"type":"integer"}},"type":"object"},"notifications":{"description":"Flat alias of `data` for the mobile client.","type":"array","items":{"type":"object"}},"total":{"description":"Flat alias of `meta.total`.","type":"integer"},"unread":{"description":"Flat alias of `meta.unread_count`.","type":"integer"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/notifications\/{id}":{"get":{"tags":["Notifications"],"summary":"Get a single notification","operationId":"v1ShowNotification","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Notification detail"},"404":{"description":"Not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/notifications\/{id}\/read":{"post":{"tags":["Notifications"],"summary":"Mark a notification as read","operationId":"v1MarkNotificationRead","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Marked as read"},"404":{"description":"Not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/notifications\/read-all":{"post":{"tags":["Notifications"],"summary":"Mark all notifications as read","operationId":"v1MarkAllNotificationsRead","responses":{"200":{"description":"All marked as read"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/notifications\/unread-count":{"get":{"tags":["Notifications"],"summary":"Get unread notification count","operationId":"v1NotificationUnreadCount","responses":{"200":{"description":"Unread count"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/ramp\/quotes":{"get":{"tags":["Ramp"],"summary":"Get quotes from all aggregated providers","operationId":"v1RampQuotes","parameters":[{"name":"type","in":"query","required":true,"schema":{"type":"string","enum":["on","off"]}},{"name":"fiat","in":"query","required":true,"schema":{"type":"string","example":"USD"}},{"name":"amount","in":"query","required":true,"schema":{"type":"number","example":100}},{"name":"crypto","in":"query","required":true,"schema":{"type":"string","example":"USDC"}}],"responses":{"200":{"description":"Provider quotes","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"quotes":{"type":"array","items":{"properties":{"provider_name":{"type":"string","example":"Simplex"},"quote_id":{"type":"string","example":"q_12345"},"fiat_amount":{"type":"number","example":100},"crypto_amount":{"type":"number","example":0.0025},"exchange_rate":{"type":"number","example":2.6e-5},"fee":{"type":"number","example":3.5},"network_fee":{"type":"number","example":0.5},"fee_currency":{"type":"string","example":"USD"},"payment_methods":{"type":"array","items":{"type":"string"}}},"type":"object"}},"provider":{"type":"string","example":"stripe_crypto_onramp"},"valid_until":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/ramp\/session":{"post":{"tags":["Ramp"],"summary":"Create a ramp session with a selected quote","operationId":"v1CreateRampSession","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["type","fiat_currency","fiat_amount","crypto_currency","wallet_address"],"properties":{"type":{"type":"string","enum":["on","off"]},"fiat_currency":{"type":"string","example":"USD"},"fiat_amount":{"type":"number","example":100},"crypto_currency":{"type":"string","example":"USDC"},"wallet_address":{"type":"string","example":"0x..."},"quote_id":{"description":"Selected quote ID from GET \/quotes","type":"string","example":"q_12345"}},"type":"object"}}}},"responses":{"201":{"description":"Session created with checkout_url"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/ramp\/session\/{id}":{"get":{"tags":["Ramp"],"summary":"Get ramp session status","operationId":"v1GetRampSession","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Session status"},"404":{"description":"Not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/ramp\/sessions":{"get":{"tags":["Ramp"],"summary":"List user ramp sessions","operationId":"v1ListRampSessions","responses":{"200":{"description":"Session list"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/ramp\/supported":{"get":{"tags":["Ramp"],"summary":"Get supported currencies and provider info","operationId":"v1RampSupported","responses":{"200":{"description":"Supported currencies","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"provider":{"type":"string","example":"stripe_crypto_onramp"},"fiat_currencies":{"type":"array","items":{"type":"string"},"example":"[\"USD\",\"EUR\",\"GBP\"]"},"crypto_currencies":{"type":"array","items":{"type":"string"},"example":"[\"USDC\",\"USDT\",\"ETH\",\"BTC\"]"},"modes":{"type":"array","items":{"properties":{"type":{"type":"string","example":"on"},"label":{"type":"string","example":"Buy Crypto"}},"type":"object"}}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/ramp\/webhook\/{provider}":{"post":{"tags":["Ramp"],"summary":"Ramp provider webhook (Stripe Crypto Onramp, Onramper, Bridge.xyz, etc.)","operationId":"v1RampWebhook","parameters":[{"name":"provider","in":"path","required":true,"schema":{"description":"`stripe_bridge` is deprecated \u2014 use `stripe_crypto_onramp`","type":"string","enum":["stripe_crypto_onramp","onramper","mock","stripe_bridge"]}}],"responses":{"200":{"description":"Webhook processed"},"400":{"description":"Invalid signature or malformed body"},"404":{"description":"Unknown provider"},"500":{"description":"Processing error"}}}},"\/api\/v1\/referrals\/my-code":{"get":{"tags":["Referrals"],"summary":"Get or generate user referral code","operationId":"v1GetReferralCode","responses":{"200":{"description":"Referral code","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"code":{"type":"string","example":"ABC12345"},"share_link":{"type":"string","example":"https:\/\/finaegis.com\/invite\/ABC12345"},"share_text":{"type":"string"},"uses_count":{"type":"integer","example":3},"max_uses":{"type":"integer","example":50},"active":{"type":"boolean","example":true},"expires_at":{"type":"string","format":"date-time","nullable":true},"created_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/referrals\/apply":{"post":{"tags":["Referrals"],"summary":"Apply a referral code","operationId":"v1ApplyReferralCode","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["code"],"properties":{"code":{"type":"string","example":"ABC12345"}},"type":"object"}}}},"responses":{"200":{"description":"Referral applied"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/referrals":{"get":{"tags":["Referrals"],"summary":"List user referrals","operationId":"v1ListReferrals","parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"maximum":50}}],"responses":{"200":{"description":"Referral list"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/referrals\/stats":{"get":{"tags":["Referrals"],"summary":"Get referral stats","operationId":"v1ReferralStats","responses":{"200":{"description":"Referral stats","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"total_referred":{"type":"integer","example":5},"completed":{"type":"integer","example":3},"pending":{"type":"integer","example":2},"rewards_earned":{"type":"integer","example":15},"reward_per_referral":{"type":"integer","example":5}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/sponsorship\/status":{"get":{"tags":["Sponsorship"],"summary":"Get user gas sponsorship status","operationId":"v1SponsorshipStatus","responses":{"200":{"description":"Sponsorship status","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"eligible":{"type":"boolean","example":true},"remaining_free_tx":{"type":"integer","example":3},"total_limit":{"type":"integer","example":5},"total_sponsored":{"type":"integer","example":2},"progress_pct":{"type":"number","example":40},"free_until":{"type":"string","format":"date-time","nullable":true},"expires_in_days":{"type":"integer","example":25,"nullable":true}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v2\/banks\/available":{"get":{"tags":["Banking V2"],"summary":"Get available banks","description":"Returns list of available bank connectors with their capabilities, supported currencies, and features.","operationId":"bankGetAvailableBanks","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"code":{"type":"string","example":"revolut"},"name":{"type":"string","example":"Revolut"},"available":{"type":"boolean","example":true},"supported_currencies":{"type":"array","items":{"type":"string","example":"EUR"}},"supported_transfer_types":{"type":"array","items":{"type":"string","example":"SEPA"}},"features":{"type":"array","items":{"type":"string","example":"instant_transfers"}},"supports_instant_transfers":{"type":"boolean","example":true},"supports_multi_currency":{"type":"boolean","example":true}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/banks\/connections":{"get":{"tags":["Banking V2"],"summary":"Get user bank connections","description":"Returns list of the authenticated user's bank connections with status and sync information.","operationId":"bankGetUserConnections","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"string","example":"conn_abc123"},"bank_code":{"type":"string","example":"revolut"},"status":{"type":"string","example":"active"},"active":{"type":"boolean","example":true},"needs_renewal":{"type":"boolean","example":false},"permissions":{"type":"array","items":{"type":"string","example":"read_accounts"}},"last_sync_at":{"type":"string","format":"date-time","nullable":true},"expires_at":{"type":"string","format":"date-time","nullable":true},"created_at":{"type":"string","format":"date-time"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/banks\/connect":{"post":{"tags":["Banking V2"],"summary":"Connect to a bank","description":"Establishes a new connection between the authenticated user and a bank using provided credentials.","operationId":"bankConnectBank","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["bank_code","credentials"],"properties":{"bank_code":{"type":"string","example":"revolut"},"credentials":{"properties":{"api_key":{"type":"string","example":"sk_live_xxx"},"api_secret":{"type":"string","example":"secret_xxx"}},"type":"object"}},"type":"object"}}}},"responses":{"201":{"description":"Bank connected successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"id":{"type":"string","example":"conn_abc123"},"bank_code":{"type":"string","example":"revolut"},"status":{"type":"string","example":"active"},"expires_at":{"type":"string","format":"date-time","nullable":true},"message":{"type":"string","example":"Successfully connected to bank"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error or connection failure"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/banks\/disconnect\/{bankCode}":{"delete":{"tags":["Banking V2"],"summary":"Disconnect from a bank","description":"Removes the authenticated user's connection to the specified bank.","operationId":"bankDisconnectBank","parameters":[{"name":"bankCode","in":"path","description":"Bank connector code","required":true,"schema":{"type":"string","example":"revolut"}}],"responses":{"200":{"description":"Successfully disconnected","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Successfully disconnected from bank"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Bank connection not found"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/banks\/accounts":{"get":{"tags":["Banking V2"],"summary":"Get user bank accounts","description":"Returns list of the authenticated user's bank accounts, optionally filtered by bank code.","operationId":"bankGetBankAccounts","parameters":[{"name":"bank_code","in":"query","description":"Filter accounts by bank code","required":false,"schema":{"type":"string","example":"revolut"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"string","example":"acct_abc123"},"bank_code":{"type":"string","example":"revolut"},"account_number":{"type":"string","example":"***1234"},"iban":{"type":"string","example":"GB82***5678"},"currency":{"type":"string","example":"EUR"},"account_type":{"type":"string","example":"checking"},"status":{"type":"string","example":"active"},"label":{"type":"string","example":"Main Account"},"created_at":{"type":"string","format":"date-time"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/banks\/accounts\/sync\/{bankCode}":{"post":{"tags":["Banking V2"],"summary":"Sync bank accounts","description":"Triggers a synchronization of the authenticated user's accounts for the specified bank.","operationId":"bankSyncAccounts","parameters":[{"name":"bankCode","in":"path","description":"Bank connector code","required":true,"schema":{"type":"string","example":"revolut"}}],"responses":{"200":{"description":"Accounts synced successfully","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"Bank accounts synced successfully"},"accounts_synced":{"type":"integer","example":3}},"type":"object"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/banks\/balance\/aggregate":{"get":{"tags":["Banking V2"],"summary":"Get aggregated balance","description":"Returns the aggregated balance across all connected bank accounts for the specified currency.","operationId":"bankGetAggregatedBalance","parameters":[{"name":"currency","in":"query","description":"Three-letter ISO currency code","required":true,"schema":{"type":"string","example":"EUR","maxLength":3,"minLength":3}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"currency":{"type":"string","example":"EUR"},"balance":{"type":"integer","example":150000},"formatted":{"type":"string","example":"1,500.00"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/banks\/transfer":{"post":{"tags":["Banking V2"],"summary":"Initiate inter-bank transfer","description":"Initiates a transfer between bank accounts, potentially across different banks. Amount is specified in the major currency unit (e.g., euros) and converted to minor units internally.","operationId":"bankInitiateTransfer","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["from_bank_code","from_account_id","to_bank_code","to_account_id","amount","currency"],"properties":{"from_bank_code":{"type":"string","example":"revolut"},"from_account_id":{"type":"string","example":"acct_src_123"},"to_bank_code":{"type":"string","example":"wise"},"to_account_id":{"type":"string","example":"acct_dst_456"},"amount":{"type":"number","format":"float","example":100.5},"currency":{"type":"string","example":"EUR","maxLength":3,"minLength":3},"reference":{"type":"string","example":"Invoice #1234","nullable":true,"maxLength":140},"description":{"type":"string","example":"Payment for services","nullable":true,"maxLength":500}},"type":"object"}}}},"responses":{"201":{"description":"Transfer initiated successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"id":{"type":"string","example":"txn_abc123"},"type":{"type":"string","example":"inter_bank"},"status":{"type":"string","example":"pending"},"amount":{"type":"integer","example":10050},"currency":{"type":"string","example":"EUR"},"reference":{"type":"string","example":"Invoice #1234"},"total_amount":{"type":"integer","example":10150},"fees":{"type":"integer","example":100},"estimated_arrival":{"type":"string","format":"date-time","nullable":true},"created_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error or transfer failure"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/banks\/health\/{bankCode}":{"get":{"tags":["Banking V2"],"summary":"Get bank health status","description":"Returns the current health and availability status for the specified bank connector.","operationId":"bankGetBankHealth","parameters":[{"name":"bankCode","in":"path","description":"Bank connector code","required":true,"schema":{"type":"string","example":"revolut"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"status":{"type":"string","example":"healthy"},"latency_ms":{"type":"integer","example":120},"last_checked_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/banks\/recommendations":{"get":{"tags":["Banking V2"],"summary":"Get recommended banks","description":"Returns a list of recommended banks for the authenticated user based on optional currency, feature, and country filters.","operationId":"bankGetRecommendedBanks","parameters":[{"name":"currencies[]","in":"query","description":"Filter by supported currencies (ISO 4217, 3-letter codes)","required":false,"schema":{"type":"array","items":{"type":"string","example":"EUR"}}},{"name":"features[]","in":"query","description":"Filter by required features","required":false,"schema":{"type":"array","items":{"type":"string","example":"instant_transfers"}}},{"name":"countries[]","in":"query","description":"Filter by supported countries (ISO 3166-1 alpha-2, 2-letter codes)","required":false,"schema":{"type":"array","items":{"type":"string","example":"DE"}}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Server error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/compliance\/kyc\/status":{"get":{"tags":["Compliance V2"],"summary":"Get KYC status","description":"Returns the current KYC verification status, risk rating, verification history, and transaction limits for the authenticated user.","operationId":"complianceV2GetKycStatus","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"kyc_level":{"type":"string","example":"basic"},"kyc_status":{"type":"string","example":"verified"},"risk_rating":{"type":"string","example":"low"},"requires_verification":{"type":"array","items":{"type":"string","example":"address"}},"verifications":{"type":"array","items":{"properties":{"id":{"type":"string"},"type":{"type":"string","example":"identity"},"status":{"type":"string","example":"completed"},"completed_at":{"type":"string","format":"date-time","nullable":true},"expires_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}},"limits":{"properties":{"daily":{"type":"number","example":10000},"monthly":{"type":"number","example":50000},"single":{"type":"number","example":5000}},"type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/compliance\/kyc\/start":{"post":{"tags":["Compliance V2"],"summary":"Start KYC verification","description":"Initiates a new KYC verification process for the authenticated user with the specified type and optional provider.","operationId":"complianceV2StartVerification","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["type"],"properties":{"type":{"type":"string","example":"identity","enum":["identity","address","income","enhanced_due_diligence"]},"provider":{"type":"string","example":"onfido","nullable":true,"enum":["jumio","onfido","manual"]}},"type":"object"}}}},"responses":{"201":{"description":"Verification started successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"verification_id":{"type":"string"},"verification_number":{"type":"string"},"type":{"type":"string","example":"identity"},"status":{"type":"string","example":"pending"},"provider":{"type":"string","example":"onfido"},"next_steps":{"type":"array","items":{"type":"string","example":"upload_identity_document"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error or verification failed to start"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/compliance\/kyc\/{verificationId}\/document":{"post":{"tags":["Compliance V2"],"summary":"Upload verification document","description":"Uploads a document (identity or address proof) for an active KYC verification. Supports JPG, PNG, and PDF up to 10MB.","operationId":"complianceV2UploadDocument","parameters":[{"name":"verificationId","in":"path","description":"The verification ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"required":["document_type","document"],"properties":{"document_type":{"description":"Type of document being uploaded","type":"string","example":"passport"},"document":{"description":"Document file (jpg, jpeg, png, pdf, max 10MB)","type":"string","format":"binary"},"document_side":{"description":"Which side of the document","type":"string","nullable":true,"enum":["front","back"]}},"type":"object"}}}},"responses":{"200":{"description":"Document processed successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"success":{"type":"boolean","example":true},"verification_id":{"type":"string"},"confidence_score":{"type":"number","format":"float","example":95.5,"nullable":true},"next_steps":{"type":"array","items":{"type":"string","example":"upload_selfie"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Verification not found"},"422":{"description":"Verification not in valid state or document verification failed"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/compliance\/kyc\/{verificationId}\/selfie":{"post":{"tags":["Compliance V2"],"summary":"Upload selfie for biometric verification","description":"Uploads a selfie image for biometric liveness and face-match verification. If all checks pass with sufficient confidence, the verification is automatically completed.","operationId":"complianceV2UploadSelfie","parameters":[{"name":"verificationId","in":"path","description":"The verification ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"required":["selfie"],"properties":{"selfie":{"description":"Selfie image file (jpg, jpeg, png, max 5MB)","type":"string","format":"binary"}},"type":"object"}}}},"responses":{"200":{"description":"Selfie processed successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"success":{"type":"boolean","example":true},"liveness_score":{"type":"number","format":"float","example":98.2},"face_match_score":{"type":"number","format":"float","example":95.7},"verification_status":{"type":"string","example":"completed"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Verification not found"},"422":{"description":"Biometric verification failed"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/compliance\/aml\/status":{"get":{"tags":["Compliance V2"],"summary":"Get AML screening status","description":"Returns the current AML screening status, including PEP\/sanctions\/adverse media flags and screening history for the authenticated user.","operationId":"complianceV2GetScreeningStatus","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"is_pep":{"type":"boolean","example":false},"is_sanctioned":{"type":"boolean","example":false},"has_adverse_media":{"type":"boolean","example":false},"last_screening_date":{"type":"string","format":"date-time","nullable":true},"screenings":{"type":"array","items":{"properties":{"id":{"type":"string"},"screening_number":{"type":"string"},"type":{"type":"string","example":"comprehensive"},"status":{"type":"string","example":"completed"},"overall_risk":{"type":"string","example":"low"},"total_matches":{"type":"integer","example":0},"completed_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/compliance\/aml\/request-screening":{"post":{"tags":["Compliance V2"],"summary":"Request AML screening","description":"Initiates a comprehensive AML screening for the authenticated user, checking sanctions lists, PEP databases, and adverse media.","operationId":"complianceV2RequestScreening","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["type"],"properties":{"type":{"type":"string","example":"comprehensive","enum":["sanctions","pep","adverse_media","comprehensive"]},"reason":{"type":"string","example":"Routine periodic review","nullable":true,"maxLength":500}},"type":"object"}}}},"responses":{"201":{"description":"Screening initiated successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"screening_id":{"type":"string"},"screening_number":{"type":"string"},"status":{"type":"string","example":"pending"},"estimated_completion":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error or screening failed to initiate"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/compliance\/risk-profile":{"get":{"tags":["Compliance V2"],"summary":"Get risk profile","description":"Returns the authenticated user's compliance risk profile including risk rating, score, CDD level, transaction limits, country\/currency restrictions, and monitoring status.","operationId":"complianceV2GetRiskProfile","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"profile_number":{"type":"string"},"risk_rating":{"type":"string","example":"low"},"risk_score":{"type":"number","example":25},"cdd_level":{"type":"string","example":"standard"},"factors":{"type":"array","items":{"type":"string","example":"high_risk_geography"}},"limits":{"properties":{"daily":{"type":"number","example":10000},"monthly":{"type":"number","example":50000},"single":{"type":"number","example":5000}},"type":"object"},"restrictions":{"properties":{"countries":{"type":"array","items":{"type":"string","example":"KP"}},"currencies":{"type":"array","items":{"type":"string","example":"XMR"}}},"type":"object"},"enhanced_monitoring":{"type":"boolean","example":false},"next_review_date":{"type":"string","format":"date-time","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/compliance\/check-transaction":{"post":{"tags":["Compliance V2"],"summary":"Check transaction eligibility","description":"Checks whether the authenticated user is allowed to perform a transaction of the specified amount, currency, and type, based on their compliance profile and limits.","operationId":"complianceV2CheckTransactionEligibility","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["amount","currency","type"],"properties":{"amount":{"type":"number","example":1500},"currency":{"type":"string","example":"USD","maxLength":3,"minLength":3},"type":{"type":"string","example":"transfer"},"destination_country":{"type":"string","example":"DE","nullable":true,"maxLength":2,"minLength":2}},"type":"object"}}}},"responses":{"200":{"description":"Eligibility check result","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"allowed":{"type":"boolean","example":true},"reason":{"type":"string","example":"Within daily limit","nullable":true},"limit":{"type":"number","example":10000,"nullable":true},"current_usage":{"type":"number","example":3500,"nullable":true},"requires_additional_verification":{"type":"boolean","example":false}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/financial-institutions\/application-form":{"get":{"tags":["BaaS Onboarding"],"summary":"Get application form structure","description":"Returns the application form structure including institution types, required fields, and document requirements for financial institution onboarding.","operationId":"fiGetApplicationForm","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"institution_types":{"type":"object"},"required_fields":{"properties":{"institution_details":{"type":"object"},"contact_information":{"type":"object"},"address_information":{"type":"object"},"business_information":{"type":"object"},"technical_requirements":{"type":"object"},"compliance_information":{"type":"object"}},"type":"object"},"document_requirements":{"properties":{"certificate_of_incorporation":{"type":"string","example":"Certificate of Incorporation"},"regulatory_license":{"type":"string","example":"Regulatory License"},"audited_financials":{"type":"string","example":"Audited Financial Statements (Last 3 Years)"},"aml_policy":{"type":"string","example":"AML\/KYC Policy Document"},"data_protection_policy":{"type":"string","example":"Data Protection Policy"}},"type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/financial-institutions\/apply":{"post":{"tags":["BaaS Onboarding"],"summary":"Submit financial institution application","description":"Submits a new financial institution onboarding application with institution details, contact information, business information, technical requirements, and compliance information.","operationId":"fiSubmitApplication","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["institution_name","legal_name","registration_number","tax_id","country","institution_type","years_in_operation","contact_name","contact_email","contact_phone","contact_position","headquarters_address","headquarters_city","headquarters_postal_code","headquarters_country","business_description","target_markets","product_offerings","required_currencies","integration_requirements","has_aml_program","has_kyc_procedures","has_data_protection_policy","is_pci_compliant","is_gdpr_compliant"],"properties":{"institution_name":{"type":"string","example":"Acme Finance Ltd"},"legal_name":{"type":"string","example":"Acme Finance Limited"},"registration_number":{"type":"string","example":"REG-12345678"},"tax_id":{"type":"string","example":"TAX-87654321"},"country":{"type":"string","example":"GB","maxLength":2,"minLength":2},"institution_type":{"type":"string","example":"bank"},"assets_under_management":{"type":"number","example":50000000,"nullable":true},"years_in_operation":{"type":"integer","example":10},"primary_regulator":{"type":"string","example":"FCA","nullable":true},"regulatory_license_number":{"type":"string","example":"FCA-123456","nullable":true},"contact_name":{"type":"string","example":"John Doe"},"contact_email":{"type":"string","format":"email","example":"john@acmefinance.com"},"contact_phone":{"type":"string","example":"+44 20 7946 0958"},"contact_position":{"type":"string","example":"CTO"},"contact_department":{"type":"string","example":"Technology","nullable":true},"headquarters_address":{"type":"string","example":"123 Finance Street"},"headquarters_city":{"type":"string","example":"London"},"headquarters_state":{"type":"string","example":"Greater London","nullable":true},"headquarters_postal_code":{"type":"string","example":"EC1A 1BB"},"headquarters_country":{"type":"string","example":"GB","maxLength":2,"minLength":2},"business_description":{"type":"string","example":"A comprehensive digital banking platform providing retail and corporate banking services across Europe with focus on innovative payment solutions."},"target_markets":{"type":"array","items":{"type":"string","example":"GB"}},"product_offerings":{"type":"array","items":{"type":"string","example":"payments"}},"expected_monthly_transactions":{"type":"integer","example":50000,"nullable":true},"expected_monthly_volume":{"type":"number","example":10000000,"nullable":true},"required_currencies":{"type":"array","items":{"type":"string","example":"GBP"}},"integration_requirements":{"type":"array","items":{"type":"string","example":"rest_api"}},"requires_api_access":{"type":"boolean","example":true},"requires_webhooks":{"type":"boolean","example":true},"requires_reporting":{"type":"boolean","example":true},"security_certifications":{"type":"array","items":{"type":"string","example":"ISO27001"},"nullable":true},"has_aml_program":{"type":"boolean","example":true},"has_kyc_procedures":{"type":"boolean","example":true},"has_data_protection_policy":{"type":"boolean","example":true},"is_pci_compliant":{"type":"boolean","example":true},"is_gdpr_compliant":{"type":"boolean","example":true},"compliance_certifications":{"type":"array","items":{"type":"string","example":"PCI-DSS"},"nullable":true},"source":{"type":"string","example":"website","nullable":true},"referral_code":{"type":"string","example":"REF-2024-001","nullable":true}},"type":"object"}}}},"responses":{"201":{"description":"Application submitted successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"application_id":{"type":"string","example":"app_abc123"},"application_number":{"type":"string","example":"FI-2024-00001"},"status":{"type":"string","example":"pending_review"},"required_documents":{"type":"array","items":{"type":"string","example":"certificate_of_incorporation"}},"message":{"type":"string","example":"Application submitted successfully"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error or submission failure"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/financial-institutions\/application\/{applicationNumber}\/status":{"get":{"tags":["BaaS Onboarding"],"summary":"Get application status","description":"Returns the current status, review stage, risk rating, and document verification status for a specific financial institution application.","operationId":"fiGetApplicationStatus","parameters":[{"name":"applicationNumber","in":"path","description":"The application number","required":true,"schema":{"type":"string","example":"FI-2024-00001"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"application_number":{"type":"string","example":"FI-2024-00001"},"institution_name":{"type":"string","example":"Acme Finance Ltd"},"status":{"type":"string","example":"pending_review"},"review_stage":{"type":"string","example":"initial_review"},"risk_rating":{"type":"string","example":"low","nullable":true},"submitted_at":{"type":"string","format":"date-time"},"documents":{"type":"object"},"is_editable":{"type":"boolean","example":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Application not found"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/financial-institutions\/application\/{applicationNumber}\/documents":{"post":{"tags":["BaaS Onboarding"],"summary":"Upload application document","description":"Uploads a supporting document for a financial institution application. Accepts PDF, JPG, JPEG, and PNG files up to 10MB. Application must be in an editable status.","operationId":"fiUploadDocument","parameters":[{"name":"applicationNumber","in":"path","description":"The application number","required":true,"schema":{"type":"string","example":"FI-2024-00001"}}],"requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"required":["document_type","document"],"properties":{"document_type":{"type":"string","example":"certificate_of_incorporation"},"document":{"description":"Document file (PDF, JPG, JPEG, PNG; max 10MB)","type":"string","format":"binary"}},"type":"object"}}}},"responses":{"200":{"description":"Document uploaded successfully","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"document_type":{"type":"string","example":"certificate_of_incorporation"},"uploaded":{"type":"boolean","example":true},"filename":{"type":"string","example":"certificate.pdf"},"size":{"type":"integer","example":204800},"message":{"type":"string","example":"Document uploaded successfully"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Application not found"},"422":{"description":"Application not editable or validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v2\/financial-institutions\/api-documentation":{"get":{"tags":["BaaS Onboarding"],"summary":"Get partner API documentation","description":"Returns the partner API documentation including base URL, authentication details, rate limits, available endpoints, webhook events, and error codes.","operationId":"fiGetApiDocumentation","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"base_url":{"type":"string","example":"https:\/\/app.example.com\/api\/partner\/v1"},"authentication":{"properties":{"type":{"type":"string","example":"Bearer Token"},"header":{"type":"string","example":"Authorization: Bearer {api_client_id}:{api_client_secret}"}},"type":"object"},"rate_limits":{"properties":{"sandbox":{"properties":{"per_minute":{"type":"integer","example":60},"per_day":{"type":"integer","example":10000}},"type":"object"},"production":{"properties":{"per_minute":{"type":"integer","example":300},"per_day":{"type":"integer","example":100000}},"type":"object"}},"type":"object"},"endpoints":{"type":"object"},"webhook_events":{"type":"array","items":{"type":"string","example":"account.created"}},"error_codes":{"type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/gcu":{"get":{"tags":["GCU"],"summary":"Get GCU information","description":"Get current information about the Global Currency Unit including composition and value","operationId":"getGCUInfo","responses":{"200":{"description":"GCU information","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"code":{"type":"string","example":"GCU"},"name":{"type":"string","example":"Global Currency Unit"},"symbol":{"type":"string","example":"\u01e4"},"current_value":{"type":"number","format":"float","example":1.0975},"value_currency":{"type":"string","example":"USD"},"last_rebalanced":{"type":"string","format":"date-time"},"next_rebalance":{"type":"string","format":"date-time"},"composition":{"type":"array","items":{"properties":{"asset_code":{"type":"string"},"asset_name":{"type":"string"},"weight":{"type":"number","format":"float"},"value_contribution":{"type":"number","format":"float"}},"type":"object"}},"statistics":{"properties":{"total_supply":{"type":"integer"},"holders_count":{"type":"integer"},"24h_change":{"type":"number","format":"float"},"7d_change":{"type":"number","format":"float"},"30d_change":{"type":"number","format":"float"}},"type":"object"}},"type":"object"}},"type":"object"}}}}}}},"\/gcu\/value-history":{"get":{"tags":["GCU"],"summary":"Get GCU value history","description":"Get historical value data for the Global Currency Unit","operationId":"getGCUValueHistory","parameters":[{"name":"period","in":"query","description":"Time period for history","required":false,"schema":{"type":"string","default":"30d","enum":["24h","7d","30d","90d","1y","all"]}},{"name":"interval","in":"query","description":"Data interval","required":false,"schema":{"type":"string","default":"daily","enum":["hourly","daily","weekly","monthly"]}}],"responses":{"200":{"description":"GCU value history","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"timestamp":{"type":"string","format":"date-time"},"value":{"type":"number","format":"float"},"change":{"type":"number","format":"float"}},"type":"object"}},"meta":{"properties":{"period":{"type":"string"},"interval":{"type":"string"},"start_value":{"type":"number","format":"float"},"end_value":{"type":"number","format":"float"},"total_change":{"type":"number","format":"float"},"total_change_percent":{"type":"number","format":"float"}},"type":"object"}},"type":"object"}}}}}}},"\/gcu\/governance\/active-polls":{"get":{"tags":["GCU"],"summary":"Get active GCU governance polls","description":"Get currently active polls related to GCU governance","operationId":"getGCUActivePolls","responses":{"200":{"description":"Active GCU polls","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"start_date":{"type":"string","format":"date-time"},"end_date":{"type":"string","format":"date-time"},"participation_rate":{"type":"number","format":"float"},"current_results":{"type":"object"},"time_remaining":{"properties":{"days":{"type":"integer"},"hours":{"type":"integer"},"human_readable":{"type":"string"}},"type":"object"}},"type":"object"}}},"type":"object"}}}}}}},"\/gcu\/composition":{"get":{"tags":["GCU"],"summary":"Get real-time GCU composition data","description":"Get detailed real-time composition data for the Global Currency Unit including current weights, values, and recent changes","operationId":"getGCUComposition","responses":{"200":{"description":"GCU composition data","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"basket_code":{"type":"string","example":"GCU"},"last_updated":{"type":"string","format":"date-time"},"total_value_usd":{"type":"number","format":"float"},"composition":{"type":"array","items":{"properties":{"asset_code":{"type":"string"},"asset_name":{"type":"string"},"asset_type":{"type":"string","enum":["fiat","crypto","commodity"]},"weight":{"type":"number","format":"float"},"current_price_usd":{"type":"number","format":"float"},"value_contribution_usd":{"type":"number","format":"float"},"percentage_of_basket":{"type":"number","format":"float"},"24h_change":{"type":"number","format":"float"},"7d_change":{"type":"number","format":"float"}},"type":"object"}},"rebalancing":{"properties":{"frequency":{"type":"string"},"last_rebalanced":{"type":"string","format":"date-time"},"next_rebalance":{"type":"string","format":"date-time"},"automatic":{"type":"boolean"}},"type":"object"},"performance":{"properties":{"24h_change_usd":{"type":"number","format":"float"},"24h_change_percent":{"type":"number","format":"float"},"7d_change_usd":{"type":"number","format":"float"},"7d_change_percent":{"type":"number","format":"float"},"30d_change_usd":{"type":"number","format":"float"},"30d_change_percent":{"type":"number","format":"float"}},"type":"object"}},"type":"object"}},"type":"object"}}}}}}},"\/gcu\/supported-banks":{"get":{"tags":["GCU"],"summary":"Get supported banks for GCU","description":"Get list of banks that support GCU deposits and their coverage","operationId":"getGCUSupportedBanks","responses":{"200":{"description":"Supported banks","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"code":{"type":"string"},"name":{"type":"string"},"country":{"type":"string"},"deposit_protection":{"type":"string"},"deposit_protection_amount":{"type":"integer"},"supported_currencies":{"type":"array","items":{"type":"string"}},"features":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["operational","degraded","maintenance"]}},"type":"object"}}},"type":"object"}}}}}}},"\/gcu\/buy":{"post":{"tags":["GCU Trading"],"summary":"Buy GCU tokens","description":"Purchase GCU tokens using fiat currency","operationId":"buyGCU","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["amount","currency"],"properties":{"amount":{"description":"Amount to spend in source currency","type":"number","format":"float","example":1000,"minimum":100},"currency":{"description":"Source currency code (EUR, USD, GBP, CHF)","type":"string","example":"EUR"},"account_uuid":{"description":"Account UUID (optional, defaults to user's primary account)","type":"string","format":"uuid"}},"type":"object"}}}},"responses":{"200":{"description":"GCU purchase successful","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"transaction_id":{"type":"string","format":"uuid"},"account_uuid":{"type":"string","format":"uuid"},"spent_amount":{"type":"number","format":"float","example":1000},"spent_currency":{"type":"string","example":"EUR"},"received_amount":{"type":"number","format":"float","example":912.45},"received_currency":{"type":"string","example":"GCU"},"exchange_rate":{"type":"number","format":"float","example":0.91245},"fee_amount":{"type":"number","format":"float","example":10},"fee_currency":{"type":"string","example":"EUR"},"new_gcu_balance":{"type":"number","format":"float","example":1912.45},"timestamp":{"type":"string","format":"date-time"}},"type":"object"},"message":{"type":"string","example":"Successfully purchased 912.45 GCU"}},"type":"object"}}}},"400":{"description":"Invalid request parameters","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"Insufficient balance or validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"sanctum":[]}]}},"\/gcu\/sell":{"post":{"tags":["GCU Trading"],"summary":"Sell GCU tokens","description":"Sell GCU tokens for fiat currency","operationId":"sellGCU","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["amount","currency"],"properties":{"amount":{"description":"Amount of GCU to sell","type":"number","format":"float","example":100,"minimum":10},"currency":{"description":"Target currency code (EUR, USD, GBP, CHF)","type":"string","example":"EUR"},"account_uuid":{"description":"Account UUID (optional, defaults to user's primary account)","type":"string","format":"uuid"}},"type":"object"}}}},"responses":{"200":{"description":"GCU sale successful","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"transaction_id":{"type":"string","format":"uuid"},"account_uuid":{"type":"string","format":"uuid"},"sold_amount":{"type":"number","format":"float","example":100},"sold_currency":{"type":"string","example":"GCU"},"received_amount":{"type":"number","format":"float","example":109},"received_currency":{"type":"string","example":"EUR"},"exchange_rate":{"type":"number","format":"float","example":1.0956},"fee_amount":{"type":"number","format":"float","example":1.1},"fee_currency":{"type":"string","example":"EUR"},"new_gcu_balance":{"type":"number","format":"float","example":812.45},"timestamp":{"type":"string","format":"date-time"}},"type":"object"},"message":{"type":"string","example":"Successfully sold 100.00 GCU"}},"type":"object"}}}},"400":{"description":"Invalid request parameters","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"Insufficient GCU balance or validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"security":[{"sanctum":[]}]}},"\/gcu\/quote":{"get":{"tags":["GCU Trading"],"summary":"Get GCU trading quote","description":"Get a quote for buying or selling GCU","operationId":"getGCUQuote","parameters":[{"name":"operation","in":"query","description":"Operation type","required":true,"schema":{"type":"string","enum":["buy","sell"]}},{"name":"amount","in":"query","description":"Amount (in source currency for buy, in GCU for sell)","required":true,"schema":{"type":"number","format":"float","minimum":0.01}},{"name":"currency","in":"query","description":"Fiat currency code","required":true,"schema":{"type":"string","enum":["EUR","USD","GBP","CHF"]}}],"responses":{"200":{"description":"Trading quote","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"operation":{"type":"string","example":"buy"},"input_amount":{"type":"number","format":"float","example":1000},"input_currency":{"type":"string","example":"EUR"},"output_amount":{"type":"number","format":"float","example":912.45},"output_currency":{"type":"string","example":"GCU"},"exchange_rate":{"type":"number","format":"float","example":0.91245},"fee_amount":{"type":"number","format":"float","example":10},"fee_currency":{"type":"string","example":"EUR"},"fee_percentage":{"type":"number","format":"float","example":1},"quote_valid_until":{"type":"string","format":"date-time"},"minimum_amount":{"type":"number","format":"float"},"maximum_amount":{"type":"number","format":"float"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/gcu\/trading-limits":{"get":{"tags":["GCU Trading"],"summary":"Get user's GCU trading limits","description":"Get the authenticated user's trading limits for GCU operations","operationId":"getGCUTradingLimits","responses":{"200":{"description":"Trading limits","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"daily_buy_limit":{"type":"number","format":"float","example":10000},"daily_sell_limit":{"type":"number","format":"float","example":10000},"daily_buy_used":{"type":"number","format":"float","example":2500},"daily_sell_used":{"type":"number","format":"float","example":0},"monthly_buy_limit":{"type":"number","format":"float","example":100000},"monthly_sell_limit":{"type":"number","format":"float","example":100000},"monthly_buy_used":{"type":"number","format":"float","example":15000},"monthly_sell_used":{"type":"number","format":"float","example":5000},"minimum_buy_amount":{"type":"number","format":"float","example":100},"minimum_sell_amount":{"type":"number","format":"float","example":10},"kyc_level":{"type":"integer","example":2},"limits_currency":{"type":"string","example":"EUR"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/":{"get":{"tags":["Public API"],"summary":"Get API information","description":"Returns information about the API including version, status, and available endpoints","operationId":"getApiInfo","responses":{"200":{"description":"API information","content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","example":"Zelta Public API"},"version":{"type":"string","example":"2.0.0"},"description":{"type":"string"},"status":{"type":"string","example":"operational"},"endpoints":{"properties":{"accounts":{"type":"string","example":"\/v2\/accounts"},"assets":{"type":"string","example":"\/v2\/assets"},"exchange_rates":{"type":"string","example":"\/v2\/exchange-rates"},"baskets":{"type":"string","example":"\/v2\/baskets"},"webhooks":{"type":"string","example":"\/v2\/webhooks"}},"type":"object"},"documentation":{"type":"string","example":"https:\/\/docs.zelta.app"},"support":{"type":"string","example":"api@zelta.app"}},"type":"object"}}}}}}},"\/status":{"get":{"tags":["Public API"],"summary":"Get API status","description":"Returns the current operational status of the API and its components","operationId":"getApiStatus","responses":{"200":{"description":"API status","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"operational"},"timestamp":{"type":"string","format":"date-time"},"components":{"properties":{"api":{"type":"string","example":"operational"},"database":{"type":"string","example":"operational"},"redis":{"type":"string","example":"operational"},"bank_connectors":{"properties":{"paysera":{"type":"string","example":"operational"},"deutsche_bank":{"type":"string","example":"operational"},"santander":{"type":"string","example":"degraded"}},"type":"object"}},"type":"object"},"metrics":{"properties":{"response_time_ms":{"type":"integer","example":45},"uptime_percentage":{"type":"number","example":99.95}},"type":"object"}},"type":"object"}}}}}}},"\/api\/v2\/gcu\/voting\/proposals":{"get":{"tags":["GCU Voting"],"summary":"Get voting proposals","operationId":"f318ecdd62462b7e0eb0109e731d3ec0","parameters":[{"name":"status","in":"query","description":"Filter by status (active, upcoming, past)","required":false,"schema":{"type":"string","enum":["active","upcoming","past"]}}],"responses":{"200":{"description":"List of voting proposals","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"success"},"data":{"type":"array","items":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"},"voting_starts_at":{"type":"string","format":"date-time"},"voting_ends_at":{"type":"string","format":"date-time"},"participation_rate":{"type":"number"},"approval_rate":{"type":"number"}},"type":"object"}}},"type":"object"}}}}}}},"\/api\/v2\/gcu\/voting\/proposals\/{id}":{"get":{"tags":["GCU Voting"],"summary":"Get proposal details","operationId":"a413e42f0d3750c7898ea1bc3daf6052","parameters":[{"name":"id","in":"path","description":"Proposal ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Proposal details","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"success"},"data":{"type":"object"}},"type":"object"}}}}}}},"\/api\/v2\/gcu\/voting\/proposals\/{id}\/vote":{"post":{"tags":["GCU Voting"],"summary":"Cast a vote","operationId":"26e7c1223824df9748e1bc7d40edfe53","parameters":[{"name":"id","in":"path","description":"Proposal ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"vote":{"type":"string","enum":["for","against","abstain"]}},"type":"object"}}}},"responses":{"200":{"description":"Vote cast successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"success"},"message":{"type":"string"},"data":{"properties":{"vote":{"type":"string"},"voting_power":{"type":"number"}},"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v2\/gcu\/voting\/my-votes":{"get":{"tags":["GCU Voting"],"summary":"Get user's voting history","operationId":"1c38a74569aeed1d38baca6dd7c7e40f","responses":{"200":{"description":"User's voting history","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string","example":"success"},"data":{"type":"array","items":{"properties":{"proposal_id":{"type":"integer"},"proposal_title":{"type":"string"},"vote":{"type":"string"},"voting_power":{"type":"number"},"voted_at":{"type":"string","format":"date-time"}},"type":"object"}}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhooks","description":"Get a list of all configured webhooks for the authenticated user","operationId":"listWebhooks","responses":{"200":{"description":"List of webhooks","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"url"},"events":{"type":"array","items":{"type":"string"}},"is_active":{"type":"boolean"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"last_triggered_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Webhooks"],"summary":"Create webhook","description":"Create a new webhook endpoint","operationId":"createWebhook","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["url","events"],"properties":{"url":{"type":"string","format":"url","example":"https:\/\/example.com\/webhook"},"events":{"type":"array","items":{"type":"string"},"example":["account.created","transaction.completed"]},"description":{"type":"string","example":"Production webhook for transaction notifications"},"is_active":{"type":"boolean","default":true}},"type":"object"}}}},"responses":{"201":{"description":"Webhook created","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"secret":{"type":"string","example":"whsec_[redacted]"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/webhooks\/{id}":{"get":{"tags":["Webhooks"],"summary":"Get webhook details","description":"Get details of a specific webhook","operationId":"getWebhook","parameters":[{"name":"id","in":"path","description":"Webhook ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Webhook details","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"is_active":{"type":"boolean"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"statistics":{"properties":{"total_deliveries":{"type":"integer"},"successful_deliveries":{"type":"integer"},"failed_deliveries":{"type":"integer"},"last_triggered_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Webhooks"],"summary":"Update webhook","description":"Update webhook configuration","operationId":"updateWebhook","parameters":[{"name":"id","in":"path","description":"Webhook ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"url":{"type":"string","format":"url"},"events":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"is_active":{"type":"boolean"}},"type":"object"}}}},"responses":{"200":{"description":"Webhook updated"}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Webhooks"],"summary":"Delete webhook","description":"Delete a webhook endpoint","operationId":"deleteWebhook","parameters":[{"name":"id","in":"path","description":"Webhook ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Webhook deleted"}},"security":[{"bearerAuth":[]}]}},"\/webhooks\/{id}\/deliveries":{"get":{"tags":["Webhooks"],"summary":"List webhook deliveries","description":"Get delivery history for a webhook","operationId":"listWebhookDeliveries","parameters":[{"name":"id","in":"path","description":"Webhook ID","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","description":"Filter by status","required":false,"schema":{"type":"string","enum":["pending","success","failed"]}}],"responses":{"200":{"description":"Webhook deliveries"}},"security":[{"bearerAuth":[]}]}},"\/webhooks\/events":{"get":{"tags":["Webhooks"],"summary":"List available webhook events","description":"Get a list of all available webhook events that can be subscribed to","operationId":"listWebhookEvents","responses":{"200":{"description":"Available webhook events","content":{"application\/json":{"schema":{"properties":{"data":{"properties":{"account":{"type":"array","items":{"type":"string"}},"transaction":{"type":"array","items":{"type":"string"}},"transfer":{"type":"array","items":{"type":"string"}},"basket":{"type":"array","items":{"type":"string"}},"governance":{"type":"array","items":{"type":"string"}}},"type":"object"}},"type":"object"}}}}}}},"\/api\/v1\/virtuals-agents":{"get":{"tags":["Virtuals Agents"],"summary":"List employer agents","description":"Returns all Virtuals Protocol agents registered by the authenticated user.","operationId":"virtualsAgentIndex","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"id":{"type":"string","format":"uuid"},"virtualsAgentId":{"type":"string"},"agentName":{"type":"string"},"status":{"type":"string","enum":["registered","active","suspended","deactivated"]},"chain":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/virtuals-agents\/onboard":{"post":{"tags":["Virtuals Agents"],"summary":"Onboard a new Virtuals agent","description":"Registers a Virtuals Protocol agent with FinAegis, provisions spending limits and TrustCert credentials.","operationId":"virtualsAgentOnboard","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["virtuals_agent_id","agent_name"],"properties":{"virtuals_agent_id":{"type":"string","example":"agent_abc123","maxLength":255},"agent_name":{"type":"string","example":"Treasury Bot","maxLength":255},"agent_description":{"type":"string","example":"Handles daily treasury operations","nullable":true},"chain":{"type":"string","example":"base","enum":["base","polygon","arbitrum","ethereum"]},"daily_limit_cents":{"type":"integer","example":50000,"nullable":true,"minimum":1},"per_tx_limit_cents":{"type":"integer","example":10000,"nullable":true,"minimum":1}},"type":"object"}}}},"responses":{"200":{"description":"Agent onboarded successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error or onboarding failure"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/virtuals-agents\/{id}":{"get":{"tags":["Virtuals Agents"],"summary":"Get agent details with spending summary","description":"Returns a single Virtuals agent profile with spending summary. Requires ownership.","operationId":"virtualsAgentShow","parameters":[{"name":"id","in":"path","description":"Agent profile UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"profile":{"type":"object"},"spending":{"properties":{"daily_limit":{"type":"integer"},"spent_today":{"type":"integer"},"remaining":{"type":"integer"},"last_transactions":{"type":"array","items":{"type":"object"}}},"type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden \u2014 not the agent owner"},"404":{"description":"Agent not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/virtuals-agents\/{id}\/suspend":{"put":{"tags":["Virtuals Agents"],"summary":"Suspend an agent","description":"Suspends an active Virtuals agent. Requires ownership.","operationId":"virtualsAgentSuspend","parameters":[{"name":"id","in":"path","description":"Agent profile UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Agent suspended","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"message":{"type":"string","example":"Agent suspended successfully."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Agent not found"},"422":{"description":"Agent cannot be suspended"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/virtuals-agents\/{id}\/activate":{"put":{"tags":["Virtuals Agents"],"summary":"Activate an agent","description":"Activates a suspended or registered Virtuals agent. Requires ownership.","operationId":"virtualsAgentActivate","parameters":[{"name":"id","in":"path","description":"Agent profile UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Agent activated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"message":{"type":"string","example":"Agent activated successfully."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Agent not found"},"422":{"description":"Agent cannot be activated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/virtuals-agents\/{id}\/transactions":{"get":{"tags":["Virtuals Agents"],"summary":"Get agent transactions","description":"Returns recent payment transactions for the given Virtuals agent. Requires ownership.","operationId":"virtualsAgentTransactions","parameters":[{"name":"id","in":"path","description":"Agent profile UUID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"agent_id":{"type":"string"},"daily_limit":{"type":"integer"},"spent_today":{"type":"integer"},"remaining":{"type":"integer"},"last_transactions":{"type":"array","items":{"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Agent not found"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/virtuals-agents\/agdp":{"get":{"tags":["Virtuals Agents"],"summary":"Get aGDP metrics","description":"Returns aggregate Agent GDP metrics \u2014 total payments, active agents, and transaction counts across all Virtuals agents.","operationId":"virtualsAgentAgdp","parameters":[{"name":"period","in":"query","description":"Reporting period","required":false,"schema":{"type":"string","default":"24h","enum":["1h","24h","7d","30d"]}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"totalPaymentsCents":{"type":"integer"},"totalTransactions":{"type":"integer"},"activeAgents":{"type":"integer"},"totalAgents":{"type":"integer"},"period":{"type":"string"},"calculatedAt":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/votes":{"get":{"tags":["Governance - Votes"],"summary":"Get user's voting history","description":"Retrieve the authenticated user's voting history","operationId":"552d3ad7dc75be8e39bc19d16c5fa972","parameters":[{"name":"poll_id","in":"query","description":"Filter by specific poll ID","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","description":"Number of votes per page","required":false,"schema":{"type":"integer","default":15,"maximum":100,"minimum":1}}],"responses":{"200":{"description":"User's voting history","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Vote"}},"meta":{"type":"object"},"links":{"type":"object"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/votes\/{id}":{"get":{"tags":["Governance - Votes"],"summary":"Get vote details","description":"Retrieve detailed information about a specific vote","operationId":"c2a9b1dfbe3ec738a52437c63f1be8ba","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Vote details","content":{"application\/json":{"schema":{"properties":{"data":{"$ref":"#\/components\/schemas\/Vote"}},"type":"object"}}}},"404":{"description":"Vote not found"},"403":{"description":"Access denied"}},"security":[{"sanctum":[]}]}},"\/api\/votes\/{id}\/verify":{"post":{"tags":["Governance - Votes"],"summary":"Verify vote integrity","description":"Verify the cryptographic signature of a vote","operationId":"8f09df8ed257cc1fa8e0a0da6d92ae92","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Vote verification result","content":{"application\/json":{"schema":{"properties":{"verified":{"type":"boolean"},"message":{"type":"string"}},"type":"object"}}}},"404":{"description":"Vote not found"},"403":{"description":"Access denied"}},"security":[{"sanctum":[]}]}},"\/api\/votes\/stats":{"get":{"tags":["Governance - Votes"],"summary":"Get user's voting statistics","description":"Retrieve statistics about the user's voting activity","operationId":"f2be71d66073ac97b0a5bc8166b53aeb","responses":{"200":{"description":"User's voting statistics","content":{"application\/json":{"schema":{"properties":{"total_votes":{"type":"integer"},"total_voting_power":{"type":"integer"},"recent_votes":{"description":"Votes in last 30 days","type":"integer"},"avg_voting_power":{"type":"number","format":"float"},"participation_rate":{"type":"number","format":"float"}},"type":"object"}}}}},"security":[{"sanctum":[]}]}},"\/api\/v1\/wallet\/tokens":{"get":{"tags":["Mobile Wallet"],"summary":"Get supported token list","description":"Returns the list of supported tokens with network availability and decimals info.","operationId":"walletTokens","responses":{"200":{"description":"Token list","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"symbol":{"type":"string","example":"USDC"},"name":{"type":"string","example":"USD Coin"},"decimals":{"type":"integer","example":6},"networks":{"type":"array","items":{"type":"string"},"example":["polygon","base","arbitrum"]},"icon":{"type":"string","example":"usdc"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/wallet\/balances":{"get":{"tags":["Mobile Wallet"],"summary":"Get token balances (EVM + Solana)","description":"Returns token balances across all of the authenticated user's EVM smart accounts and Solana wallet (SPL tokens + native SOL).","operationId":"walletBalances","responses":{"200":{"description":"Balances per token and network","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"token":{"type":"string","example":"USDC"},"network":{"type":"string","example":"polygon"},"address":{"type":"string","example":"0x1234...abcd"},"balance":{"type":"string","example":"1000.50"},"usd_value":{"description":"USD equivalent of the balance","type":"number","format":"float","example":1000.5},"error":{"description":"Present only if balance query failed","type":"string","example":null,"nullable":true}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/wallet\/state":{"get":{"tags":["Mobile Wallet"],"summary":"Get aggregated wallet state","description":"Returns aggregated wallet state including addresses, balances, supported networks and sync information.","operationId":"walletState","responses":{"200":{"description":"Aggregated wallet state","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"addresses":{"type":"array","items":{"properties":{"address":{"type":"string","example":"0x1234...abcd"},"network":{"type":"string","example":"polygon"},"deployed":{"type":"boolean","example":true}},"type":"object"}},"balances":{"type":"array","items":{"properties":{"token":{"type":"string","example":"USDC"},"network":{"type":"string","example":"polygon"},"balance":{"type":"string","example":"1000.50"},"usd_value":{"type":"number","format":"float","example":1000.5}},"type":"object"}},"total_usd_value":{"type":"number","format":"float","example":2500.75},"shielded_balance":{"type":"number","format":"float","example":0},"networks":{"type":"array","items":{"type":"string"},"example":["polygon","ethereum","arbitrum"]},"synced_at":{"type":"string","format":"date-time"},"account_count":{"type":"integer","example":2}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/wallet\/addresses":{"get":{"tags":["Mobile Wallet"],"summary":"List user's addresses per network","description":"Returns all smart account addresses for the authenticated user across supported networks.","operationId":"walletAddresses","responses":{"200":{"description":"User addresses","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"address":{"type":"string","example":"0x1234...abcd"},"network":{"type":"string","example":"polygon"},"deployed":{"type":"boolean","example":true},"created_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]},"post":{"tags":["Mobile Wallet"],"summary":"Register Privy-derived addresses","description":"Stores the user's on-device-derived EVM smart-account address (same across all 4 EVM chains) plus their Solana ed25519 pubkey. Idempotent \u2014 re-posting the same payload is a no-op.","operationId":"walletRegisterAddresses","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["evm","solana"],"properties":{"evm":{"required":["address"],"properties":{"address":{"type":"string","example":"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"},"ownerPasskeyCredentialId":{"type":"string","example":"cred_abc123","nullable":true}},"type":"object"},"solana":{"required":["address"],"properties":{"address":{"type":"string","example":"EfkncjQTojTB6m9DqoyBqizLLwZgLu1uwg3Y3FqE6f7Z"}},"type":"object"}},"type":"object"}}}},"responses":{"201":{"description":"Addresses registered"},"422":{"description":"Invalid address or address already owned by a different user"},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/wallet\/transactions":{"get":{"tags":["Mobile Wallet"],"summary":"List transactions with cursor-based pagination","description":"Returns a paginated list of transactions from the user's activity feed using cursor-based pagination.","operationId":"walletTransactions","parameters":[{"name":"cursor","in":"query","description":"Pagination cursor for the next page","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of items per page (max 100, default 20)","required":false,"schema":{"type":"integer","default":20,"maximum":100}}],"responses":{"200":{"description":"Transaction feed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"description":"Activity feed with items and pagination cursor","type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/wallet\/transactions\/{id}":{"get":{"tags":["Mobile Wallet"],"summary":"Get transaction detail","description":"Returns detailed information for a specific transaction by ID.","operationId":"walletTransactionDetail","parameters":[{"name":"id","in":"path","description":"Transaction identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Transaction detail","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"description":"Transaction detail object","type":"object"}},"type":"object"}}}},"404":{"description":"Transaction not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"TRANSACTION_NOT_FOUND"},"message":{"type":"string","example":"Transaction not found."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/wallet\/transactions\/by-intent\/{intentId}":{"get":{"tags":["Mobile Wallet"],"summary":"Get wallet send status by intent id","description":"Returns the live status of a wallet send identified by its prepare\/submit intent id.","operationId":"walletTransactionByIntent","parameters":[{"name":"intentId","in":"path","description":"Send intent id (pi_send_\u2026)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Wallet send status","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"description":"Wallet send status object","type":"object"}},"type":"object"}}}},"404":{"description":"Intent not found"},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/wallet\/transactions\/prepare":{"post":{"tags":["Mobile Wallet"],"summary":"Prepare an unsigned send payload","description":"Builds the unsigned Solana legacy-tx message bytes (ed25519) or ERC-4337 v0.6 UserOp hash (with Pimlico paymaster sponsorship) for the device to sign via Privy. Persists a `pending` wallet_send_record. Mobile signs and POSTs the signature to \/transactions\/submit.","operationId":"walletTransactionPrepare","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["to","token","amount","network","quote_id"],"properties":{"to":{"type":"string","example":"0x1234...abcd or base58 Solana pubkey"},"token":{"type":"string","example":"USDC","enum":["USDC","USDT"]},"amount":{"description":"Decimal major units. Send \"1\" or \"1.5\"; not \"1000000\".","type":"string","example":"1.50"},"network":{"description":"SOLANA | TRON | polygon | base | arbitrum | ethereum (case-sensitive \u2014 must match the exact PaymentNetwork enum value, same as the value returned in quote response)","type":"string","example":"SOLANA"},"quote_id":{"description":"Canonical snake_case. The legacy camelCase `quoteId` is also accepted.","type":"string","example":"q_abc123"}},"type":"object"}}}},"responses":{"201":{"description":"Unsigned payload ready"},"409":{"description":"Idempotency conflict"},"422":{"description":"Validation \/ address \/ asset \/ amount \/ network error"},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/wallet\/transactions\/submit":{"post":{"tags":["Mobile Wallet"],"summary":"Submit a signed payload","description":"Attaches a Privy-produced signature (ed25519 for Solana, smart-wallet signature blob for EVM) to the matching prepared record and broadcasts via Helius \/ Pimlico.","operationId":"walletTransactionSubmit","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["intent_id","signature"],"properties":{"intent_id":{"description":"Canonical snake_case. The legacy camelCase `intentId` is also accepted.","type":"string","example":"pi_send_abc123"},"signature":{"description":"For Solana: 64-byte ed25519 signature, base64-encoded. For EVM: 0x-prefixed hex signature blob from Privy smart wallet.","type":"string","example":"0x... or base64 ed25519"}},"type":"object"}}}},"responses":{"200":{"description":"Submitted (or already submitted)"},"404":{"description":"Intent not found for this user"},"422":{"description":"Bad signature \/ state"},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/wallet\/recent-recipients":{"get":{"tags":["Mobile Wallet"],"summary":"Get recent send recipients","description":"Returns unique recipient addresses from recent send transactions, ordered by most recent.","operationId":"walletRecentRecipients","parameters":[{"name":"limit","in":"query","description":"Number of recipients to return (max 50, default 10)","required":false,"schema":{"type":"integer","default":10,"maximum":50}}],"responses":{"200":{"description":"Recent recipients list","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"address":{"type":"string","example":"0x1234...abcd"},"name":{"type":"string","example":"Alice Johnson","nullable":true},"network":{"type":"string","example":"polygon"},"token":{"type":"string","example":"USDC"},"last_sent_at":{"type":"string","format":"date-time"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/wallet\/validate-address":{"get":{"tags":["Mobile Wallet"],"summary":"Validate a blockchain address","description":"Validates a blockchain address format for the specified network.","operationId":"walletValidateAddress","parameters":[{"name":"address","in":"query","description":"Blockchain address to validate (20-128 characters)","required":true,"schema":{"type":"string","example":"0x1234567890abcdef1234567890abcdef12345678","maxLength":128,"minLength":20}},{"name":"network","in":"query","description":"Target network for validation","required":true,"schema":{"type":"string","example":"POLYGON"}}],"responses":{"200":{"description":"Address validation result","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"description":"Validation result with address details","type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/wallet\/resolve-name":{"post":{"tags":["Mobile Wallet"],"summary":"Resolve an ENS\/SNS name to an address","description":"Resolves a domain name (e.g. vitalik.eth, alice.sol) to a blockchain address on the specified network.","operationId":"walletResolveName","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name","network"],"properties":{"name":{"description":"Domain name to resolve (e.g. alice.sol, vitalik.eth)","type":"string","example":"vitalik.eth"},"network":{"description":"Target network","type":"string","example":"ETHEREUM"}},"type":"object"}}}},"responses":{"200":{"description":"Name resolved successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"description":"Resolution result with resolved address","type":"object"}},"type":"object"}}}},"422":{"description":"Name could not be resolved","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"data":{"description":"Resolution result indicating failure","type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/wallet\/quote":{"post":{"tags":["Mobile Wallet"],"summary":"Get a fee quote for a transfer","description":"Returns a fee quote for a wallet-to-wallet transfer on the specified network and asset.","operationId":"walletQuote","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["network","asset","amount"],"properties":{"network":{"description":"Target network","type":"string","example":"POLYGON"},"asset":{"description":"Asset\/token symbol","type":"string","example":"USDC"},"amount":{"description":"Transfer amount (must be > 0, max 1000000)","type":"number","example":100.5}},"type":"object"}}}},"responses":{"200":{"description":"Fee quote","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"description":"Transfer quote with fee breakdown","type":"object"}},"type":"object"}}}},"400":{"description":"Quote failed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"code":{"type":"string","example":"QUOTE_FAILED"},"message":{"type":"string","example":"Unable to generate quote."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/wallet\/transactions\/quote":{"post":{"tags":["Mobile Wallet"],"summary":"Get a transaction quote with recipient validation","description":"Returns a fee quote for a transfer to a specific recipient address, validating the recipient on the specified network.","operationId":"walletTransactionQuote","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["to","network","asset","amount"],"properties":{"to":{"description":"Recipient address","type":"string","example":"0x1234..."},"network":{"description":"Target network","type":"string","example":"POLYGON"},"asset":{"description":"Asset\/token symbol","type":"string","example":"USDC"},"amount":{"description":"Transfer amount","type":"number","example":100.5}},"type":"object"}}}},"responses":{"200":{"description":"Transaction quote","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"quote_id":{"type":"string"},"to":{"type":"string"},"amount":{"type":"string"},"asset":{"type":"string"},"network":{"type":"string"},"fee":{"type":"string"},"total":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid recipient or quote failed"},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/websocket\/subscriptions":{"get":{"tags":["WebSocket Subscriptions"],"summary":"List active paid channel subscriptions","description":"List active subscriptions for the authenticated user.","operationId":"643d46df899b7378ebecc4bacb16d173","responses":{"200":{"description":"Active subscriptions"}}}},"\/api\/v1\/websocket\/subscriptions\/{id}":{"delete":{"tags":["WebSocket Subscriptions"],"summary":"Cancel a paid channel subscription","description":"Cancel an active subscription.","operationId":"5b023406d2808cd390c20d8dcfa8f4cf","responses":{"200":{"description":"Subscription cancelled"},"404":{"description":"Subscription not found"}}}},"\/api\/websocket\/config":{"get":{"tags":["WebSocket"],"summary":"Get WebSocket connection configuration","description":"Get WebSocket connection configuration.\n\nReturns the necessary configuration for clients to connect\nto the Pusher-compatible WebSocket server (Soketi).","operationId":"getWebSocketConfig","responses":{"200":{"description":"WebSocket configuration","content":{"application\/json":{"schema":{"properties":{"enabled":{"type":"boolean","example":true},"key":{"type":"string","example":"finaegis-key"},"cluster":{"type":"string","example":"mt1"},"ws_host":{"type":"string","example":"127.0.0.1"},"ws_port":{"type":"integer","example":6001},"wss_port":{"type":"integer","example":6001},"force_tls":{"type":"boolean","example":false},"encrypted":{"type":"boolean","example":true},"auth_endpoint":{"type":"string","example":"\/broadcasting\/auth"}},"type":"object"}}}}}}},"\/api\/websocket\/channels":{"get":{"tags":["WebSocket"],"summary":"Get available WebSocket channels for user","description":"Get available channels for the authenticated user.\n\nReturns the list of channels the user can subscribe to\nbased on their tenant membership and role.","operationId":"getWebSocketChannels","responses":{"200":{"description":"Available channels","content":{"application\/json":{"schema":{"properties":{"channels":{"type":"array","items":{"properties":{"name":{"type":"string","example":"private-tenant.1.exchange"},"type":{"type":"string","example":"private"},"description":{"type":"string","example":"Exchange\/trading updates"},"events":{"type":"array","items":{"type":"string"},"example":["orderbook.updated","trade.executed"]}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/websocket\/status":{"get":{"tags":["WebSocket"],"summary":"Get WebSocket server status","description":"Get WebSocket server status.\n\nReturns the current status of the WebSocket server.\nUseful for health checks and monitoring.","operationId":"getWebSocketStatus","responses":{"200":{"description":"WebSocket server status","content":{"application\/json":{"schema":{"properties":{"enabled":{"type":"boolean","example":true},"connected":{"type":"boolean","example":true},"server":{"type":"string","example":"soketi"},"rate_limits":{"type":"object","example":{"order_book":10,"trades":50,"portfolio":1}}},"type":"object"}}}}}}},"\/api\/websocket\/channels\/{type}":{"get":{"tags":["WebSocket"],"summary":"Get channel information by type","description":"Get channel information by type.\n\nReturns details about a specific channel type including\nrate limits and event descriptions.","operationId":"getChannelInfo","parameters":[{"name":"type","in":"path","description":"Channel type","required":true,"schema":{"type":"string","enum":["exchange","accounts","transactions","compliance","wallet"]}}],"responses":{"200":{"description":"Channel information","content":{"application\/json":{"schema":{"properties":{"type":{"type":"string","example":"exchange"},"suffix":{"type":"string","example":"exchange"},"events":{"type":"array","items":{"type":"string"}},"rate_limit":{"properties":{"max_per_second":{"type":"integer"},"batch_window_ms":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"404":{"description":"Channel type not found"}}}},"\/api\/v1\/webhooks\/vertexsms\/dlr":{"post":{"tags":["SMS Webhooks"],"summary":"VertexSMS delivery report webhook","description":"Receives SMS delivery status updates from VertexSMS. Accepts either a URL-token (`?t=...`) or an HMAC-SHA256 signature (`X-VertexSMS-Signature` header) for authentication.","operationId":"vertexSmsDlr","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["id","status"],"properties":{"id":{"description":"VertexSMS message ID (as returned from POST \/sms)","type":"string"},"status":{"description":"1=delivered, 2=undelivered, 3=Viber seen, 16=expired","type":"integer","enum":[1,2,3,16]},"error":{"description":"0 when delivered, otherwise Vertex error code","type":"integer"},"mcc":{"description":"Mobile Country Code","type":"string","nullable":true},"mnc":{"description":"Mobile Network Code","type":"string","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Delivery report accepted"},"401":{"description":"Invalid webhook signature or URL token"},"422":{"description":"Missing or invalid message id"}}}},"\/api\/workflows":{"get":{"tags":["Workflow Monitoring"],"summary":"List all workflows with filtering","description":"Retrieves a paginated list of workflows with optional filtering by status, class, and date range","operationId":"listWorkflows","parameters":[{"name":"status","in":"query","description":"Filter by workflow status","required":false,"schema":{"type":"string","enum":["created","pending","running","completed","failed","waiting"]}},{"name":"class","in":"query","description":"Filter by workflow class name (partial match)","required":false,"schema":{"type":"string"}},{"name":"per_page","in":"query","description":"Number of items per page","required":false,"schema":{"type":"integer","default":15,"maximum":100,"minimum":1}},{"name":"search","in":"query","description":"Search in workflow class and arguments","required":false,"schema":{"type":"string","maxLength":255}},{"name":"created_from","in":"query","description":"Filter workflows created after this date","required":false,"schema":{"type":"string","format":"date"}},{"name":"created_to","in":"query","description":"Filter workflows created before this date","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Workflows retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"meta":{"properties":{"current_page":{"type":"integer"},"last_page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"},"from":{"type":"integer"},"to":{"type":"integer"}},"type":"object"},"stats":{"description":"Workflow statistics","type":"object"}},"type":"object"}}}}}}},"\/api\/workflows\/{id}":{"get":{"tags":["Workflow Monitoring"],"summary":"Get workflow details","description":"Retrieves detailed information about a specific workflow including logs, exceptions, and compensation info","operationId":"getWorkflow","parameters":[{"name":"id","in":"path","description":"Workflow ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Workflow details retrieved successfully","content":{"application\/json":{"schema":{"properties":{"workflow":{"description":"Workflow details with logs","type":"object"},"exceptions":{"type":"array","items":{"type":"object"}},"compensation_info":{"description":"Compensation tracking information","type":"object"},"execution_timeline":{"type":"array","items":{"type":"object"}}},"type":"object"}}}},"404":{"description":"Workflow not found"}}}},"\/api\/workflows\/stats":{"get":{"tags":["Workflow Monitoring"],"summary":"Get workflow statistics","description":"Retrieves overall workflow execution statistics and counts by status","operationId":"getWorkflowStats","responses":{"200":{"description":"Statistics retrieved successfully","content":{"application\/json":{"schema":{"properties":{"total_workflows":{"type":"integer"},"by_status":{"type":"object","additionalProperties":{"type":"integer"}},"recent_executions":{"type":"integer"},"avg_execution_time":{"type":"number"}},"type":"object"}}}}}}},"\/api\/workflows\/status\/{status}":{"get":{"tags":["Workflow Monitoring"],"summary":"Get workflows by status","description":"Retrieves all workflows with a specific status","operationId":"getWorkflowsByStatus","parameters":[{"name":"status","in":"path","description":"Workflow status to filter by","required":true,"schema":{"type":"string","enum":["created","pending","running","completed","failed","waiting"]}}],"responses":{"200":{"description":"Workflows retrieved successfully","content":{"application\/json":{"schema":{"properties":{"status":{"type":"string"},"count":{"type":"integer"},"data":{"type":"array","items":{"type":"object"}},"meta":{"properties":{"current_page":{"type":"integer"},"last_page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid status"}}}},"\/api\/workflows\/failed":{"get":{"tags":["Workflow Monitoring"],"summary":"Get failed workflows","description":"Retrieves all failed workflows with detailed exception information","operationId":"getFailedWorkflows","responses":{"200":{"description":"Failed workflows retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"meta":{"properties":{"current_page":{"type":"integer"},"last_page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"}},"type":"object"},"error_summary":{"properties":{"most_common_errors":{"type":"array","items":{"type":"object"}},"total_exceptions":{"type":"integer"},"recent_exceptions":{"type":"integer"}},"type":"object"}},"type":"object"}}}}}}},"\/api\/workflows\/metrics":{"get":{"tags":["Workflow Monitoring"],"summary":"Get workflow execution metrics","description":"Retrieves detailed workflow execution metrics and performance data","operationId":"getWorkflowMetrics","responses":{"200":{"description":"Metrics retrieved successfully","content":{"application\/json":{"schema":{"properties":{"execution_metrics":{"properties":{"last_24_hours":{"properties":{"total_executions":{"type":"integer"},"successful":{"type":"integer"},"failed":{"type":"integer"},"average_duration":{"type":"number"}},"type":"object"},"last_7_days":{"properties":{"total_executions":{"type":"integer"},"successful":{"type":"integer"},"failed":{"type":"integer"},"average_duration":{"type":"number"}},"type":"object"}},"type":"object"},"workflow_types":{"type":"array","items":{"type":"object"}},"performance_metrics":{"type":"object"}},"type":"object"}}}}}}},"\/api\/workflows\/search":{"post":{"tags":["Workflow Monitoring"],"summary":"Search workflows","description":"Search workflows by class, arguments, output, or exception content","operationId":"searchWorkflows","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["query"],"properties":{"query":{"description":"Search query","type":"string","maxLength":255,"minLength":2},"type":{"description":"Type of search","type":"string","default":"all","enum":["class","arguments","output","exception","all"]},"per_page":{"type":"integer","default":20,"maximum":50,"minimum":1}},"type":"object"}}}},"responses":{"200":{"description":"Search results","content":{"application\/json":{"schema":{"properties":{"search_query":{"type":"string"},"search_type":{"type":"string"},"results":{"type":"array","items":{"type":"object"}},"meta":{"properties":{"total_found":{"type":"integer"},"current_page":{"type":"integer"},"last_page":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error"}}}},"\/api\/workflows\/compensations":{"get":{"tags":["Workflow Monitoring"],"summary":"Get compensation tracking","description":"Retrieves workflows that have triggered compensations or rollback activities","operationId":"getWorkflowCompensations","responses":{"200":{"description":"Compensation data retrieved successfully","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"workflow":{"type":"object"},"compensation_info":{"type":"object"},"rollback_activities":{"type":"array","items":{"type":"object"}}},"type":"object"}},"meta":{"properties":{"current_page":{"type":"integer"},"last_page":{"type":"integer"},"total":{"type":"integer"}},"type":"object"},"compensation_summary":{"properties":{"total_workflows":{"type":"integer"},"failed_workflows":{"type":"integer"},"failure_rate":{"type":"number"},"compensations_triggered":{"type":"integer"}},"type":"object"}},"type":"object"}}}}}}},"\/api\/v1\/x402\/endpoints":{"get":{"tags":["X402 Endpoints"],"summary":"List monetized endpoints","description":"List all monetized endpoints.","operationId":"5e723d43298a3d2632fe3d3f7a9b0c85","parameters":[{"name":"active","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"network","in":"query","required":false,"schema":{"type":"string"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":20,"maximum":100}}],"responses":{"200":{"description":"List of monetized endpoints"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]},"post":{"tags":["X402 Endpoints"],"summary":"Register an endpoint for x402 payment","description":"Create a monetized endpoint.","operationId":"ec8e7822c910e36d628ae43594d0ba1b","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["method","path","price"],"properties":{"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"path":{"type":"string","example":"api\/v1\/ai\/query"},"price":{"type":"string","example":"0.01"},"network":{"type":"string","example":"eip155:8453"},"description":{"type":"string"},"is_active":{"type":"boolean","example":true}},"type":"object"}}}},"responses":{"201":{"description":"Endpoint monetized"},"422":{"description":"Validation error"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/x402\/endpoints\/{id}":{"get":{"tags":["X402 Endpoints"],"summary":"Get monetized endpoint details","description":"Get a monetized endpoint.","operationId":"545148cd3d9c2c1300181049b7c2e3a3","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Endpoint details"},"404":{"description":"Not found"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]},"put":{"tags":["X402 Endpoints"],"summary":"Update monetized endpoint pricing or status","description":"Update a monetized endpoint.","operationId":"04c0c3f38a9844fc9f896a8f808b16cb","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"price":{"type":"string","example":"0.02"},"network":{"type":"string"},"description":{"type":"string"},"is_active":{"type":"boolean"},"asset":{"type":"string","enum":["USDC"]},"scheme":{"type":"string","enum":["exact","upto"]},"mime_type":{"type":"string","example":"application\/json"}},"type":"object"}}}},"responses":{"200":{"description":"Endpoint updated"},"404":{"description":"Not found"},"422":{"description":"Validation error"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]},"delete":{"tags":["X402 Endpoints"],"summary":"Remove monetization from an endpoint","description":"Delete a monetized endpoint.","operationId":"c7df3ec5ebffa16ff011d4e822f18ff5","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Endpoint removed"},"404":{"description":"Not found"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/x402\/payments":{"get":{"tags":["X402 Payments"],"summary":"List x402 payment records","description":"List x402 payments.","operationId":"5a6de40f9582eb6b029941a15030a1e6","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","verified","settled","failed","expired"]}},{"name":"network","in":"query","required":false,"schema":{"type":"string"}},{"name":"payer_address","in":"query","required":false,"schema":{"type":"string"}},{"name":"per_page","in":"query","description":"Items per page (alias: limit)","required":false,"schema":{"type":"integer","default":20,"maximum":100}}],"responses":{"200":{"description":"Paginated payment records"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/x402\/payments\/{id}":{"get":{"tags":["X402 Payments"],"summary":"Get x402 payment details","description":"Get a specific payment.","operationId":"08dce6376fa57f2c5511398dc31b1c59","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Payment details"},"404":{"description":"Not found"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/x402\/payments\/stats":{"get":{"tags":["X402 Payments"],"summary":"Get x402 payment statistics","description":"Get payment statistics.","operationId":"1c1c1efa3d40cf2cccafd3588d294626","parameters":[{"name":"period","in":"query","description":"Time period (aliases: 24h=day, 7d=week, 30d=month)","required":false,"schema":{"type":"string","default":"day","enum":["day","week","month","24h","7d","30d"]}}],"responses":{"200":{"description":"Payment statistics","content":{"application\/json":{"schema":{"properties":{"total_payments":{"type":"integer"},"total_settled":{"type":"integer"},"total_failed":{"type":"integer"},"total_volume_atomic":{"type":"string"},"total_volume_usd":{"type":"string"},"unique_payers":{"type":"integer"}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/x402\/spending-limits":{"get":{"tags":["X402 Spending Limits"],"summary":"List agent spending limits","description":"List all agent spending limits.","operationId":"7cd6dbeefaebdb990647a5498808bc9a","parameters":[{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":20,"maximum":100}}],"responses":{"200":{"description":"List of spending limits"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]},"post":{"tags":["X402 Spending Limits"],"summary":"Set spending limit for an agent","description":"Create or update an agent spending limit.","operationId":"b823b50341aa64cb3aae6c54d10b589d","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["agent_id","daily_limit"],"properties":{"agent_id":{"type":"string"},"agent_type":{"type":"string","example":"ai_agent"},"daily_limit":{"type":"string","example":"10000000"},"per_transaction_limit":{"type":"string","example":"1000000"},"auto_pay_enabled":{"type":"boolean","example":true}},"type":"object"}}}},"responses":{"201":{"description":"Spending limit created"},"200":{"description":"Spending limit updated"},"422":{"description":"Validation error"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/x402\/spending-limits\/{agentId}":{"get":{"tags":["X402 Spending Limits"],"summary":"Get agent spending limit details","description":"Get spending limit for an agent.","operationId":"7514e448ff7d7596db890383917bf8e4","parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Spending limit details"},"404":{"description":"Not found"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]},"put":{"tags":["X402 Spending Limits"],"summary":"Update agent spending limit","description":"Update an agent spending limit.","operationId":"c05730129cb73904102e83e7f8159517","parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"daily_limit":{"type":"string"},"per_transaction_limit":{"type":"string"},"auto_pay_enabled":{"type":"boolean"}},"type":"object"}}}},"responses":{"200":{"description":"Spending limit updated"},"404":{"description":"Not found"},"422":{"description":"Validation error"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]},"delete":{"tags":["X402 Spending Limits"],"summary":"Remove agent spending limit","description":"Delete an agent spending limit.","operationId":"fdf06dec923a35eb209982b19df5a13b","parameters":[{"name":"agentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Spending limit removed"},"404":{"description":"Not found"},"401":{"description":"Unauthenticated"}},"security":[{"sanctum":[]}]}},"\/api\/v1\/x402\/status":{"get":{"tags":["X402 Protocol"],"summary":"Get x402 protocol status and configuration","description":"Get x402 protocol status.","operationId":"c1a0b406e4e6f9aec069b6ad1240caad","responses":{"200":{"description":"Protocol status","content":{"application\/json":{"schema":{"properties":{"enabled":{"type":"boolean"},"version":{"type":"integer"},"protocol":{"type":"string","example":"x402"},"default_network":{"type":"string","example":"eip155:8453"},"supported_schemes":{"type":"array","items":{"type":"string"}}},"type":"object"}}}}}}},"\/.well-known\/x402-configuration":{"get":{"tags":["X402 Protocol"],"summary":"x402 protocol discovery endpoint","description":"Well-known x402 protocol discovery endpoint.","operationId":"x402WellKnown","responses":{"200":{"description":"x402 protocol discovery configuration","content":{"application\/json":{"schema":{"properties":{"x402_version":{"type":"integer","example":2},"issuer":{"type":"string"},"spec_url":{"type":"string"},"default_network":{"type":"string","example":"eip155:8453"},"supported_networks":{"type":"array","items":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"testnet":{"type":"boolean"}},"type":"object"}},"supported_assets":{"type":"array","items":{"type":"string"}},"supported_schemes":{"type":"array","items":{"type":"string"}},"facilitator":{"type":"object"},"endpoints":{"type":"object"},"contracts":{"type":"object"}},"type":"object"}}}}}}},"\/api\/v1\/x402\/supported":{"get":{"tags":["X402 Protocol"],"summary":"List supported networks and payment assets","description":"Get supported networks and assets.","operationId":"def5684fd3a11c42885b0e493638b87c","responses":{"200":{"description":"Supported networks and assets","content":{"application\/json":{"schema":{"properties":{"networks":{"type":"array","items":{"properties":{"id":{"type":"string","example":"eip155:8453"},"name":{"type":"string","example":"Base Mainnet"},"testnet":{"type":"boolean"},"usdc_address":{"type":"string"},"usdc_decimals":{"type":"integer","example":6}},"type":"object"}},"contracts":{"properties":{"permit2":{"type":"string"},"exact_permit2_proxy":{"type":"string"}},"type":"object"}},"type":"object"}}}}}}},"\/api\/v2\/treasury\/optimize":{"post":{"tags":["Treasury"],"summary":"Optimize portfolio for yield","description":"Optimize portfolio for yield.","operationId":"f71f2f14efc26d63350f1ea284aeb929","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["account_id","total_amount","target_yield","risk_level"],"properties":{"account_id":{"type":"string","format":"uuid"},"total_amount":{"type":"number","format":"float","minimum":10000},"target_yield":{"type":"number","format":"float","maximum":20,"minimum":0},"risk_level":{"type":"string","enum":["low","medium","high","very_high"]},"constraints":{"properties":{"min_liquidity":{"type":"number","format":"float"},"max_concentration":{"type":"number","format":"float"}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"Portfolio optimization result","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string"},"data":{"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/api\/v2\/treasury\/{treasuryId}\/portfolio":{"get":{"tags":["Treasury"],"summary":"Get portfolio details","description":"Get portfolio details.","operationId":"9f59b62e240028578530dcf300be9270","parameters":[{"name":"treasuryId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Portfolio details","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string"},"data":{"type":"object"}},"type":"object"}}}},"404":{"description":"Portfolio not found"}},"security":[{"bearerAuth":[]}]}},"\/api\/v2\/treasury\/{treasuryId}\/summary":{"get":{"tags":["Treasury"],"summary":"Get portfolio summary","description":"Get portfolio summary for a treasury.","operationId":"9636fe1ff20121eb89958d2eb6911a5f","parameters":[{"name":"treasuryId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Portfolio summary","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string"},"data":{"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/api\/v2\/treasury\/{treasuryId}\/rebalance-check":{"get":{"tags":["Treasury"],"summary":"Check if portfolio needs rebalancing","description":"Check if portfolio needs rebalancing.","operationId":"ed1cd6d23eca67a0d82848c595771252","parameters":[{"name":"treasuryId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Rebalancing check result","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string"},"data":{"properties":{"needs_rebalancing":{"type":"boolean"},"treasury_id":{"type":"string"}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}}},"components":{"schemas":{"AIMessage":{"title":"AI Message","description":"AI conversation message","required":["message"],"properties":{"message":{"description":"The message content","type":"string","example":"What is my account balance?"},"conversation_id":{"description":"Conversation ID for context","type":"string","format":"uuid","example":"conv_123e4567-e89b-12d3-a456"},"context":{"description":"Additional context for the AI","type":"object","example":{"account_id":"acct_123","session_type":"web"}},"model":{"description":"AI model to use","type":"string","example":"gpt-4","enum":["gpt-4","gpt-3.5-turbo","claude-3","llama-2"]},"temperature":{"description":"Creativity level","type":"number","example":0.7,"maximum":2,"minimum":0},"stream":{"description":"Enable streaming responses","type":"boolean","example":false},"enable_tools":{"description":"Allow AI to use MCP tools","type":"boolean","example":true},"max_tokens":{"description":"Maximum response length","type":"integer","example":500}},"type":"object"},"AIResponse":{"title":"AI Response","description":"AI agent response","properties":{"message_id":{"description":"Unique message ID","type":"string","example":"msg_abc123xyz"},"conversation_id":{"description":"Conversation ID","type":"string","example":"conv_123e4567"},"content":{"description":"AI response content","type":"string","example":"Your current balance is $12,456.78"},"confidence":{"description":"Confidence score","type":"number","example":0.92,"maximum":1,"minimum":0},"tools_used":{"description":"MCP tools used","type":"array","items":{"type":"string"},"example":["AccountBalanceTool","TransactionHistoryTool"]},"requires_action":{"description":"Whether user action is required","type":"boolean","example":false},"actions":{"description":"Required actions","type":"array","items":{"properties":{"type":{"type":"string","example":"transfer"},"description":{"type":"string","example":"Transfer $500 to John Smith"},"parameters":{"type":"object"},"confidence":{"type":"number","example":0.89}},"type":"object"}},"metadata":{"description":"Response metadata","type":"object"}},"type":"object"},"MCPTool":{"title":"MCP Tool","description":"Model Context Protocol tool definition","properties":{"name":{"description":"Tool name","type":"string","example":"get_account_balance"},"description":{"description":"Tool description","type":"string","example":"Retrieve account balance"},"category":{"description":"Tool category","type":"string","example":"account_management"},"parameters":{"description":"Tool parameters schema","type":"object"},"requires_auth":{"description":"Authentication required","type":"boolean","example":true},"requires_2fa":{"description":"2FA required","type":"boolean","example":false},"rate_limit":{"description":"Rate limit per minute","type":"integer","example":100},"cache_ttl":{"description":"Cache TTL in seconds","type":"integer","example":60},"ml_enabled":{"description":"ML features enabled","type":"boolean","example":false},"real_time":{"description":"Real-time processing","type":"boolean","example":true}},"type":"object"},"MCPToolExecution":{"title":"MCP Tool Execution","description":"MCP tool execution request","required":["parameters"],"properties":{"parameters":{"description":"Tool-specific parameters","type":"object","example":{"account_id":"acct_123","include_pending":true}},"timeout":{"description":"Execution timeout in ms","type":"integer","example":5000},"async":{"description":"Execute asynchronously","type":"boolean","example":false}},"type":"object"},"MCPToolResult":{"title":"MCP Tool Result","description":"MCP tool execution result","properties":{"success":{"description":"Execution success","type":"boolean","example":true},"tool":{"description":"Tool name","type":"string","example":"get_account_balance"},"result":{"description":"Tool execution result","type":"object"},"execution_time_ms":{"description":"Execution time","type":"integer","example":145},"error":{"description":"Error message if failed","type":"string"},"metadata":{"description":"Execution metadata","type":"object"}},"type":"object"},"AIConversation":{"title":"AI Conversation","description":"AI conversation thread","properties":{"id":{"description":"Conversation ID","type":"string","format":"uuid","example":"conv_123e4567"},"title":{"description":"Conversation title","type":"string","example":"Account Balance Inquiry"},"user_id":{"description":"User ID","type":"integer","example":123},"messages":{"description":"Conversation messages","type":"array","items":{"properties":{"role":{"type":"string","example":"user","enum":["user","assistant","system"]},"content":{"type":"string","example":"What is my balance?"},"timestamp":{"type":"string","format":"date-time"}},"type":"object"}},"context":{"description":"Conversation context","type":"object"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"AIFeedback":{"title":"AI Feedback","description":"User feedback for AI response","required":["message_id","rating"],"properties":{"message_id":{"description":"Message ID to provide feedback for","type":"string","example":"msg_abc123"},"rating":{"description":"Rating 1-5","type":"integer","example":5,"maximum":5,"minimum":1},"feedback":{"description":"Optional text feedback","type":"string","example":"Very helpful response"},"issues":{"description":"Reported issues","type":"array","items":{"type":"string"},"example":["incorrect_info","too_verbose"]}},"type":"object"},"MCPToolRegistration":{"title":"MCP Tool Registration","description":"Register a new MCP tool","required":["name","description","endpoint","parameters"],"properties":{"name":{"description":"Tool name","type":"string","example":"custom_analysis_tool"},"description":{"description":"Tool description","type":"string","example":"Custom financial analysis tool"},"endpoint":{"description":"Tool endpoint URL","type":"string","format":"url","example":"https:\/\/api.example.com\/tool"},"parameters":{"description":"Parameter schema","type":"object"},"category":{"description":"Tool category","type":"string","example":"analysis"},"authentication":{"description":"Authentication configuration","type":"object"},"rate_limit":{"description":"Rate limit","type":"integer","example":50},"timeout":{"description":"Timeout in ms","type":"integer","example":10000}},"type":"object"},"AIWorkflow":{"title":"AI Workflow","description":"AI-driven workflow definition","properties":{"id":{"description":"Workflow ID","type":"string","example":"wf_789xyz"},"type":{"description":"Workflow type","type":"string","example":"customer_service"},"status":{"type":"string","example":"running","enum":["pending","running","completed","failed"]},"steps":{"description":"Workflow steps","type":"array","items":{"properties":{"name":{"type":"string","example":"analyze_request"},"type":{"type":"string","example":"ai_analysis"},"status":{"type":"string","example":"completed"},"result":{"type":"object"}},"type":"object"}},"ai_config":{"description":"AI configuration","type":"object"},"human_intervention":{"description":"Human-in-the-loop config","type":"object"},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"}},"type":"object"},"KycDocument":{"required":["id","user_uuid","document_type","status","created_at"],"properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"user_uuid":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"document_type":{"type":"string","example":"passport","enum":["passport","national_id","driving_license","proof_of_address","bank_statement"]},"document_number":{"description":"Document identification number","type":"string","example":"AB123456"},"file_path":{"type":"string","example":"\/documents\/kyc\/123e4567.pdf"},"status":{"type":"string","example":"approved","enum":["pending","approved","rejected","expired"]},"verification_notes":{"type":"string","example":"Document verified successfully"},"expires_at":{"type":"string","format":"date","example":"2030-12-31"},"verified_at":{"type":"string","format":"date-time","example":"2025-01-15T10:00:00Z"},"verified_by":{"type":"string","example":"admin@finaegis.org"},"created_at":{"type":"string","format":"date-time","example":"2025-01-15T09:00:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2025-01-15T10:00:00Z"}},"type":"object"},"KycStatus":{"required":["user_uuid","verification_level","status","documents","next_review_date"],"properties":{"user_uuid":{"type":"string","format":"uuid"},"verification_level":{"description":"KYC verification tier","type":"string","example":"enhanced","enum":["basic","enhanced","premium"]},"status":{"type":"string","example":"verified","enum":["unverified","pending","verified","rejected","expired"]},"documents":{"type":"array","items":{"$ref":"#\/components\/schemas\/KycDocument"}},"limits":{"properties":{"daily_limit":{"description":"Daily transaction limit in cents","type":"integer","example":10000000},"monthly_limit":{"description":"Monthly transaction limit in cents","type":"integer","example":100000000},"single_transaction_limit":{"description":"Single transaction limit in cents","type":"integer","example":5000000}},"type":"object"},"risk_score":{"description":"Risk assessment score","type":"integer","example":25,"maximum":100,"minimum":0},"next_review_date":{"type":"string","format":"date","example":"2026-01-15"},"last_verified_at":{"type":"string","format":"date-time"}},"type":"object"},"UploadKycDocumentRequest":{"required":["document_type","document_file"],"properties":{"document_type":{"type":"string","enum":["passport","national_id","driving_license","proof_of_address","bank_statement"]},"document_number":{"description":"Document identification number","type":"string","example":"AB123456"},"document_file":{"description":"Document file upload","type":"string","format":"binary"},"expires_at":{"description":"Document expiration date","type":"string","format":"date","example":"2030-12-31"},"metadata":{"description":"Additional document metadata","type":"object"}},"type":"object"},"VerifyKycDocumentRequest":{"required":["status"],"properties":{"status":{"type":"string","example":"approved","enum":["approved","rejected"]},"verification_notes":{"type":"string","example":"Document verified against government database"},"risk_factors":{"type":"array","items":{"type":"string"},"example":["pep","high_risk_country"]}},"type":"object"},"GdprDataRequest":{"required":["id","user_uuid","request_type","status","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"user_uuid":{"type":"string","format":"uuid"},"request_type":{"type":"string","example":"export","enum":["export","deletion","rectification","portability"]},"status":{"type":"string","example":"completed","enum":["pending","processing","completed","rejected"]},"requested_data":{"type":"array","items":{"type":"string"},"example":["personal_info","transactions","documents"]},"completion_file":{"description":"Path to completed export file","type":"string","example":"\/gdpr\/exports\/user_data_123.zip"},"completed_at":{"type":"string","format":"date-time"},"notes":{"type":"string","example":"Data export completed successfully"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"CreateGdprRequestRequest":{"required":["request_type"],"properties":{"request_type":{"type":"string","enum":["export","deletion","rectification","portability"]},"requested_data":{"description":"Specific data categories requested","type":"array","items":{"type":"string"},"example":["personal_info","transactions"]},"reason":{"description":"Reason for the request","type":"string","example":"Personal backup"},"target_system":{"description":"For portability requests, where to send data","type":"string","example":"competitor_bank"}},"type":"object"},"ConsentRecord":{"required":["id","user_uuid","consent_type","status","version","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"user_uuid":{"type":"string","format":"uuid"},"consent_type":{"type":"string","example":"marketing","enum":["marketing","data_processing","third_party_sharing","cookies"]},"status":{"type":"string","example":"granted","enum":["granted","revoked","expired"]},"version":{"description":"Version of consent terms","type":"string","example":"1.0"},"ip_address":{"type":"string","example":"192.168.1.1"},"user_agent":{"type":"string","example":"Mozilla\/5.0..."},"expires_at":{"type":"string","format":"date-time"},"revoked_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}},"type":"object"},"UpdateConsentRequest":{"required":["consent_type","status"],"properties":{"consent_type":{"type":"string","enum":["marketing","data_processing","third_party_sharing","cookies"]},"status":{"type":"string","example":"granted","enum":["granted","revoked"]},"duration_days":{"description":"Consent duration in days","type":"integer","example":365}},"type":"object"},"AmlAlert":{"required":["id","user_uuid","alert_type","severity","status","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"user_uuid":{"type":"string","format":"uuid"},"alert_type":{"type":"string","example":"high_value_transaction","enum":["high_value_transaction","rapid_movement","suspicious_pattern","sanctions_match","pep_match"]},"severity":{"type":"string","example":"high","enum":["low","medium","high","critical"]},"status":{"type":"string","example":"under_review","enum":["new","under_review","escalated","closed","reported"]},"transaction_ids":{"description":"Related transaction IDs","type":"array","items":{"type":"string"}},"amount":{"description":"Amount involved in cents","type":"integer","example":10000000},"description":{"type":"string","example":"Multiple high-value transactions within 24 hours"},"investigator":{"type":"string","example":"compliance@finaegis.org"},"resolution":{"type":"string","example":"False positive - legitimate business activity"},"reported_to_authorities":{"type":"boolean","example":false},"created_at":{"type":"string","format":"date-time"},"resolved_at":{"type":"string","format":"date-time"}},"type":"object"},"SanctionsCheckResult":{"required":["checked_at","status","matches"],"properties":{"checked_at":{"type":"string","format":"date-time"},"status":{"type":"string","example":"clear","enum":["clear","potential_match","confirmed_match"]},"matches":{"type":"array","items":{"properties":{"list_name":{"type":"string","example":"OFAC SDN"},"match_score":{"type":"number","example":0.95},"entity_name":{"type":"string","example":"John Doe"},"reason":{"type":"string","example":"Name and DOB match"}},"type":"object"}},"next_check_date":{"type":"string","format":"date"}},"type":"object"},"Custodian":{"required":["id","code","name","type","is_active","capabilities"],"properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"code":{"description":"Unique custodian code","type":"string","example":"paysera"},"name":{"description":"Custodian display name","type":"string","example":"Paysera"},"type":{"type":"string","example":"emi","enum":["bank","emi","crypto_exchange","wallet_provider"]},"country":{"description":"ISO country code","type":"string","example":"LT"},"is_active":{"type":"boolean","example":true},"capabilities":{"type":"array","items":{"type":"string"},"example":["sepa","sepa_instant","swift"]},"supported_currencies":{"type":"array","items":{"type":"string"},"example":["EUR","USD","GBP"]},"api_version":{"type":"string","example":"v2.0"},"health_status":{"type":"string","example":"healthy","enum":["healthy","degraded","unhealthy"]},"metadata":{"description":"Additional custodian-specific data","type":"object"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"CustodianBalance":{"required":["custodian_code","currency","available_balance","pending_balance","reserved_balance","last_updated"],"properties":{"custodian_code":{"type":"string","example":"deutsche_bank"},"currency":{"type":"string","example":"EUR"},"available_balance":{"description":"Available balance in cents","type":"integer","example":10000000},"pending_balance":{"description":"Pending incoming balance in cents","type":"integer","example":500000},"reserved_balance":{"description":"Reserved for outgoing transfers in cents","type":"integer","example":200000},"total_balance":{"description":"Total balance including pending","type":"integer","example":10700000},"last_updated":{"type":"string","format":"date-time"},"account_numbers":{"type":"array","items":{"properties":{"type":{"type":"string","example":"iban"},"value":{"type":"string","example":"LT123456789012345678"}},"type":"object"}}},"type":"object"},"CustodianTransfer":{"required":["id","custodian_code","direction","amount","currency","status","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"custodian_code":{"type":"string","example":"santander"},"direction":{"type":"string","example":"outgoing","enum":["incoming","outgoing","internal"]},"amount":{"description":"Amount in cents","type":"integer","example":100000},"currency":{"type":"string","example":"EUR"},"status":{"type":"string","example":"completed","enum":["pending","processing","completed","failed","cancelled"]},"reference":{"description":"Internal reference","type":"string","example":"TRF-2025-001"},"external_reference":{"description":"Custodian's reference","type":"string","example":"SEPA123456"},"from_account":{"properties":{"iban":{"type":"string","example":"LT123456789012345678"},"name":{"type":"string","example":"John Doe"}},"type":"object"},"to_account":{"properties":{"iban":{"type":"string","example":"DE89370400440532013000"},"name":{"type":"string","example":"Jane Smith"}},"type":"object"},"fees":{"properties":{"amount":{"type":"integer","example":250},"currency":{"type":"string","example":"EUR"}},"type":"object"},"executed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}},"type":"object"},"InitiateCustodianTransferRequest":{"required":["from_custodian","to_custodian","amount","currency"],"properties":{"from_custodian":{"description":"Source custodian code","type":"string","example":"paysera"},"to_custodian":{"description":"Destination custodian code","type":"string","example":"deutsche_bank"},"amount":{"description":"Amount in cents","type":"integer","example":100000},"currency":{"type":"string","example":"EUR"},"reference":{"type":"string","example":"Settlement-2025-001"},"urgency":{"type":"string","example":"normal","enum":["normal","urgent","instant"]},"metadata":{"description":"Additional transfer data","type":"object"}},"type":"object"},"CustodianReconciliation":{"required":["id","custodian_code","reconciliation_date","status","discrepancies"],"properties":{"id":{"type":"string","format":"uuid"},"custodian_code":{"type":"string","example":"revolut"},"reconciliation_date":{"type":"string","format":"date","example":"2025-01-15"},"status":{"type":"string","example":"completed","enum":["pending","in_progress","completed","failed"]},"internal_balance":{"properties":{"EUR":{"type":"integer","example":5000000},"USD":{"type":"integer","example":2000000}},"type":"object"},"custodian_balance":{"properties":{"EUR":{"type":"integer","example":5000000},"USD":{"type":"integer","example":1999500}},"type":"object"},"discrepancies":{"type":"array","items":{"properties":{"currency":{"type":"string","example":"USD"},"internal_amount":{"type":"integer","example":2000000},"custodian_amount":{"type":"integer","example":1999500},"difference":{"type":"integer","example":500},"explanation":{"type":"string","example":"Pending fee deduction"}},"type":"object"}},"transaction_count":{"properties":{"internal":{"type":"integer","example":150},"custodian":{"type":"integer","example":150}},"type":"object"},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}},"type":"object"},"CustodianWebhookPayload":{"required":["event_type","custodian_code","timestamp","data"],"properties":{"event_type":{"type":"string","example":"transfer.completed","enum":["transfer.completed","transfer.failed","balance.updated","account.blocked"]},"custodian_code":{"type":"string","example":"n26"},"timestamp":{"type":"string","format":"date-time"},"data":{"description":"Event-specific data","type":"object"},"signature":{"description":"HMAC signature for verification","type":"string","example":"sha256=abc123..."}},"type":"object"},"CustodianHealthStatus":{"required":["custodian_code","status","last_check","metrics"],"properties":{"custodian_code":{"type":"string","example":"paysera"},"status":{"type":"string","example":"healthy","enum":["healthy","degraded","unhealthy"]},"last_check":{"type":"string","format":"date-time"},"uptime_percentage":{"type":"number","example":99.95},"metrics":{"properties":{"response_time_ms":{"type":"integer","example":250},"success_rate":{"type":"number","example":99.8},"error_rate":{"type":"number","example":0.2}},"type":"object"},"recent_errors":{"type":"array","items":{"properties":{"timestamp":{"type":"string","format":"date-time"},"error_type":{"type":"string","example":"timeout"},"message":{"type":"string","example":"API request timeout after 30s"}},"type":"object"}},"circuit_breaker":{"properties":{"state":{"type":"string","example":"closed","enum":["closed","open","half_open"]},"failure_count":{"type":"integer","example":0},"last_failure":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"},"CustodianSettlement":{"required":["id","settlement_date","status","total_amount","transactions"],"properties":{"id":{"type":"string","format":"uuid"},"settlement_date":{"type":"string","format":"date","example":"2025-01-15"},"status":{"type":"string","example":"completed","enum":["pending","processing","completed","failed"]},"total_amount":{"properties":{"EUR":{"type":"integer","example":1000000},"USD":{"type":"integer","example":500000}},"type":"object"},"transactions":{"type":"array","items":{"properties":{"from_custodian":{"type":"string","example":"paysera"},"to_custodian":{"type":"string","example":"deutsche_bank"},"amount":{"type":"integer","example":250000},"currency":{"type":"string","example":"EUR"},"type":{"type":"string","example":"net","enum":["net","gross"]}},"type":"object"}},"settlement_method":{"type":"string","example":"net","enum":["net","gross","batch"]},"executed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}},"type":"object"},"RegulatoryReport":{"required":["id","report_type","period_start","period_end","status","created_at"],"properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"report_type":{"type":"string","example":"ctr","enum":["ctr","sar","currency_exposure","large_exposure","liquidity","capital_adequacy"]},"period_start":{"type":"string","format":"date","example":"2025-01-01"},"period_end":{"type":"string","format":"date","example":"2025-01-31"},"status":{"type":"string","example":"submitted","enum":["draft","pending_review","approved","submitted","rejected"]},"submission_deadline":{"type":"string","format":"date","example":"2025-02-15"},"submitted_at":{"type":"string","format":"date-time","nullable":true},"submitted_by":{"type":"string","example":"compliance@finaegis.org"},"regulator":{"type":"string","example":"Bank of Lithuania"},"reference_number":{"type":"string","example":"CTR-2025-01-001"},"file_path":{"type":"string","example":"\/reports\/regulatory\/ctr_2025_01.pdf"},"metadata":{"description":"Report-specific metadata","type":"object"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"CurrencyTransactionReport":{"type":"object","allOf":[{"$ref":"#\/components\/schemas\/RegulatoryReport"},{"properties":{"report_type":{"type":"string","example":"ctr","enum":["ctr"]},"total_transactions":{"type":"integer","example":150},"total_amount":{"properties":{"EUR":{"type":"integer","example":15000000},"USD":{"type":"integer","example":10000000}},"type":"object"},"threshold_exceeded_count":{"type":"integer","example":5},"transactions":{"type":"array","items":{"properties":{"transaction_id":{"type":"string"},"account_uuid":{"type":"string"},"amount":{"type":"integer"},"currency":{"type":"string"},"type":{"type":"string","enum":["deposit","withdrawal","transfer"]},"date":{"type":"string","format":"date-time"}},"type":"object"}}},"type":"object"}]},"SuspiciousActivityReport":{"type":"object","allOf":[{"$ref":"#\/components\/schemas\/RegulatoryReport"},{"properties":{"report_type":{"type":"string","example":"sar","enum":["sar"]},"case_number":{"type":"string","example":"SAR-2025-001"},"priority":{"type":"string","example":"high","enum":["low","medium","high","critical"]},"suspicious_activities":{"type":"array","items":{"properties":{"activity_type":{"type":"string","example":"rapid_movement"},"description":{"type":"string"},"detected_at":{"type":"string","format":"date-time"},"risk_score":{"type":"integer","maximum":100,"minimum":0}},"type":"object"}},"involved_accounts":{"type":"array","items":{"type":"string"}},"total_suspicious_amount":{"type":"integer"},"investigation_notes":{"type":"string"},"law_enforcement_notified":{"type":"boolean","example":false}},"type":"object"}]},"ComplianceMetrics":{"required":["period","metrics"],"properties":{"period":{"type":"string","example":"2025-01"},"metrics":{"properties":{"kyc_completion_rate":{"type":"number","example":0.95},"aml_alerts_generated":{"type":"integer","example":45},"aml_alerts_resolved":{"type":"integer","example":42},"false_positive_rate":{"type":"number","example":0.15},"sar_filed":{"type":"integer","example":3},"ctr_filed":{"type":"integer","example":12},"sanctions_screened":{"type":"integer","example":1500},"sanctions_matches":{"type":"integer","example":2},"training_completion_rate":{"type":"number","example":0.98}},"type":"object"},"risk_distribution":{"properties":{"low":{"type":"integer","example":800},"medium":{"type":"integer","example":150},"high":{"type":"integer","example":45},"critical":{"type":"integer","example":5}},"type":"object"}},"type":"object"},"RegulatoryCreateReportRequest":{"required":["report_type","period_start","period_end"],"properties":{"report_type":{"type":"string","enum":["ctr","sar","currency_exposure","large_exposure","liquidity","capital_adequacy"]},"period_start":{"type":"string","format":"date","example":"2025-01-01"},"period_end":{"type":"string","format":"date","example":"2025-01-31"},"include_draft":{"description":"Include draft transactions","type":"boolean","example":false},"parameters":{"description":"Report-specific parameters","type":"object"}},"type":"object"},"ReportSubmission":{"required":["report_id","submission_type"],"properties":{"report_id":{"type":"string","format":"uuid"},"submission_type":{"type":"string","example":"electronic","enum":["electronic","manual","api"]},"regulator_system_id":{"type":"string","example":"BOL-REPORTING"},"submission_notes":{"type":"string"},"attachments":{"type":"array","items":{"type":"string"}}},"type":"object"},"TransactionMonitoringRule":{"required":["id","rule_name","rule_type","status","threshold"],"properties":{"id":{"type":"string","format":"uuid"},"rule_name":{"type":"string","example":"Large Cash Transaction"},"rule_type":{"type":"string","example":"amount","enum":["amount","velocity","pattern","behavioral"]},"description":{"type":"string"},"status":{"type":"string","example":"active","enum":["active","inactive","testing"]},"threshold":{"properties":{"amount":{"type":"integer","example":1000000},"currency":{"type":"string","example":"EUR"},"time_window":{"type":"string","example":"24h"}},"type":"object"},"risk_score_impact":{"type":"integer","example":25,"maximum":100,"minimum":0},"auto_escalate":{"type":"boolean","example":true},"created_at":{"type":"string","format":"date-time"},"last_triggered":{"type":"string","format":"date-time"}},"type":"object"},"ComplianceCase":{"required":["id","case_type","status","priority","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"case_number":{"type":"string","example":"CASE-2025-001"},"case_type":{"type":"string","example":"aml","enum":["aml","kyc","sanctions","fraud","other"]},"status":{"type":"string","example":"under_investigation","enum":["open","under_investigation","escalated","closed","reported"]},"priority":{"type":"string","example":"high","enum":["low","medium","high","critical"]},"subject_type":{"type":"string","example":"account","enum":["user","account","transaction"]},"subject_id":{"type":"string"},"description":{"type":"string"},"risk_score":{"type":"integer","maximum":100,"minimum":0},"assigned_to":{"type":"string","example":"compliance_officer@finaegis.org"},"evidence":{"type":"array","items":{"properties":{"type":{"type":"string"},"description":{"type":"string"},"file_path":{"type":"string"}},"type":"object"}},"actions_taken":{"type":"array","items":{"type":"string"}},"resolution":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"resolved_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"},"RegulatoryNotification":{"required":["id","type","title","severity","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","example":"deadline","enum":["deadline","regulation_change","audit","inspection","violation"]},"title":{"type":"string","example":"CTR Submission Deadline Approaching"},"description":{"type":"string"},"severity":{"type":"string","example":"warning","enum":["info","warning","urgent","critical"]},"regulator":{"type":"string","example":"Bank of Lithuania"},"deadline":{"type":"string","format":"date-time","nullable":true},"action_required":{"type":"string"},"acknowledged":{"type":"boolean","example":false},"acknowledged_by":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"}},"type":"object"},"Account":{"title":"Account","required":["uuid","user_uuid","name","balance","frozen"],"properties":{"uuid":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"user_uuid":{"type":"string","format":"uuid","example":"660e8400-e29b-41d4-a716-446655440000"},"name":{"type":"string","example":"Savings Account"},"balance":{"description":"Balance in cents","type":"integer","example":50000},"frozen":{"description":"Whether the account is frozen","type":"boolean","example":false},"created_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"}},"type":"object"},"Transaction":{"title":"Transaction","required":["uuid","account_uuid","type","amount","balance_after","description","hash"],"properties":{"uuid":{"type":"string","format":"uuid","example":"770e8400-e29b-41d4-a716-446655440000"},"account_uuid":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"type":{"type":"string","example":"deposit","enum":["deposit","withdrawal"]},"amount":{"description":"Amount in cents","type":"integer","example":10000},"balance_after":{"description":"Balance after transaction in cents","type":"integer","example":60000},"description":{"type":"string","example":"Monthly salary deposit"},"hash":{"description":"SHA3-512 transaction hash","type":"string","example":"3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e"},"created_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"}},"type":"object"},"Transfer":{"title":"Transfer","required":["uuid","from_account_uuid","to_account_uuid","amount","description","status","hash"],"properties":{"uuid":{"type":"string","format":"uuid","example":"880e8400-e29b-41d4-a716-446655440000"},"from_account_uuid":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"to_account_uuid":{"type":"string","format":"uuid","example":"660e8400-e29b-41d4-a716-446655440000"},"amount":{"description":"Amount in cents","type":"integer","example":5000},"description":{"type":"string","example":"Payment for services"},"status":{"type":"string","example":"completed","enum":["pending","completed","failed"]},"hash":{"description":"SHA3-512 transfer hash","type":"string","example":"4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f"},"created_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"},"completed_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:01Z","nullable":true}},"type":"object"},"Balance":{"title":"Balance","required":["account_uuid","balance","frozen"],"properties":{"account_uuid":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"balance":{"description":"Current balance in cents","type":"integer","example":50000},"frozen":{"type":"boolean","example":false},"last_updated":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"},"turnover":{"properties":{"total_debit":{"type":"integer","example":100000},"total_credit":{"type":"integer","example":150000},"month":{"type":"integer","example":1},"year":{"type":"integer","example":2024}},"type":"object","nullable":true}},"type":"object"},"Asset":{"title":"Asset","required":["code","name","type","precision","is_active"],"properties":{"code":{"description":"Asset code (e.g., USD, EUR, BTC)","type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"type":{"type":"string","example":"fiat","enum":["fiat","crypto","commodity","custom"]},"precision":{"description":"Number of decimal places","type":"integer","example":2},"is_active":{"type":"boolean","example":true},"metadata":{"description":"Additional asset metadata","type":"object","nullable":true},"created_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"}},"type":"object"},"ExchangeRate":{"title":"Exchange Rate","required":["from_asset_code","to_asset_code","rate","is_active"],"properties":{"id":{"type":"integer","example":1},"from_asset_code":{"type":"string","example":"USD"},"to_asset_code":{"type":"string","example":"EUR"},"rate":{"description":"Exchange rate with 10 decimal precision","type":"string","example":"0.8500000000"},"bid":{"type":"string","example":"0.8495000000","nullable":true},"ask":{"type":"string","example":"0.8505000000","nullable":true},"source":{"description":"Rate source","type":"string","example":"manual"},"is_active":{"type":"boolean","example":true},"expires_at":{"type":"string","format":"date-time","nullable":true},"valid_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"},"metadata":{"type":"object","nullable":true},"created_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"}},"type":"object"},"AccountBalance":{"title":"Account Balance","required":["account_uuid","asset_code","balance"],"properties":{"id":{"type":"integer","example":1},"account_uuid":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"asset_code":{"type":"string","example":"USD"},"balance":{"description":"Balance in smallest unit (cents for USD)","type":"integer","example":50000},"created_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"},"asset":{"$ref":"#\/components\/schemas\/Asset"},"account":{"$ref":"#\/components\/schemas\/Account"}},"type":"object"},"Poll":{"title":"Poll","required":["id","title","type","status","options","start_date","end_date"],"properties":{"id":{"type":"integer","example":1},"title":{"type":"string","example":"Should we add support for Japanese Yen?"},"description":{"type":"string","example":"This poll determines whether to add JPY support to the platform","nullable":true},"type":{"type":"string","example":"yes_no","enum":["single_choice","multiple_choice","weighted_choice","yes_no","ranked_choice"]},"status":{"type":"string","example":"active","enum":["draft","active","completed","cancelled"]},"options":{"type":"array","items":{"properties":{"id":{"type":"string","example":"yes"},"label":{"type":"string","example":"Yes, add JPY support"}},"type":"object"}},"voting_power_strategy":{"type":"string","example":"OneUserOneVoteStrategy"},"execution_workflow":{"type":"string","example":"AddAssetWorkflow","nullable":true},"min_participation":{"type":"integer","example":100,"nullable":true},"winning_threshold":{"type":"number","format":"float","example":0.5,"nullable":true},"start_date":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"},"end_date":{"type":"string","format":"date-time","example":"2024-01-08T00:00:00Z"},"created_by":{"type":"string","format":"uuid","example":"660e8400-e29b-41d4-a716-446655440000"},"created_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"},"votes_count":{"description":"Total number of votes","type":"integer","example":150},"total_voting_power":{"description":"Total voting power cast","type":"integer","example":500}},"type":"object"},"Vote":{"title":"Vote","required":["id","poll_id","user_uuid","selected_options","voting_power","voted_at"],"properties":{"id":{"type":"integer","example":1},"poll_id":{"type":"integer","example":1},"user_uuid":{"type":"string","format":"uuid","example":"660e8400-e29b-41d4-a716-446655440000"},"selected_options":{"type":"array","items":{"type":"string"},"example":["yes"]},"voting_power":{"type":"integer","example":10},"signature":{"type":"string","example":"abc123def456","nullable":true},"voted_at":{"type":"string","format":"date-time","example":"2024-01-01T12:00:00Z"},"created_at":{"type":"string","format":"date-time","example":"2024-01-01T12:00:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2024-01-01T12:00:00Z"},"poll":{"$ref":"#\/components\/schemas\/Poll"}},"type":"object"},"PollResult":{"title":"Poll Result","required":["poll","results","participation"],"properties":{"poll":{"$ref":"#\/components\/schemas\/Poll"},"results":{"description":"Vote results by option","type":"object","example":{"yes":{"votes":75,"voting_power":250},"no":{"votes":25,"voting_power":100}}},"participation":{"properties":{"total_votes":{"type":"integer","example":100},"total_voting_power":{"type":"integer","example":350},"participation_rate":{"type":"number","format":"float","example":0.25},"winning_option":{"type":"string","example":"yes","nullable":true},"meets_threshold":{"type":"boolean","example":true}},"type":"object"},"calculated_at":{"type":"string","format":"date-time","example":"2024-01-01T12:00:00Z"}},"type":"object"},"Error":{"title":"Error Response","required":["message"],"properties":{"message":{"type":"string","example":"The given data was invalid."},"error":{"type":"string","example":"VALIDATION_ERROR","nullable":true},"errors":{"type":"object","nullable":true,"additionalProperties":{"type":"array","items":{"type":"string"}}}},"type":"object"},"ValidationError":{"title":"Validation Error Response","required":["message","errors"],"properties":{"message":{"type":"string","example":"The given data was invalid."},"errors":{"type":"object","example":{"email":["The email field is required."],"amount":["The amount must be greater than 0."]},"additionalProperties":{"type":"array","items":{"type":"string"}}}},"type":"object"},"BasketAsset":{"title":"Basket Asset","required":["code","name","type","components"],"properties":{"code":{"type":"string","example":"STABLE_BASKET"},"name":{"type":"string","example":"Stable Currency Basket"},"description":{"type":"string","example":"A diversified basket of stable fiat currencies"},"type":{"type":"string","example":"fixed","enum":["fixed","dynamic"]},"rebalance_frequency":{"type":"string","example":"never","enum":["daily","weekly","monthly","quarterly","never"]},"last_rebalanced_at":{"type":"string","format":"date-time","nullable":true},"is_active":{"type":"boolean","example":true},"created_at":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z"},"components":{"type":"array","items":{"$ref":"#\/components\/schemas\/BasketComponent"}},"latest_value":{"properties":{"value":{"type":"number","format":"float","example":1.0975},"calculated_at":{"type":"string","format":"date-time"}},"type":"object","nullable":true}},"type":"object"},"BasketComponent":{"title":"Basket Component","required":["asset_code","weight"],"properties":{"asset_code":{"type":"string","example":"USD"},"asset_name":{"type":"string","example":"US Dollar"},"weight":{"description":"Weight percentage (0-100)","type":"number","format":"float","example":40},"min_weight":{"type":"number","format":"float","example":35,"nullable":true},"max_weight":{"type":"number","format":"float","example":45,"nullable":true},"is_active":{"type":"boolean","default":true}},"type":"object"},"BasketValue":{"title":"Basket Value","required":["basket_code","value","calculated_at"],"properties":{"basket_code":{"type":"string","example":"STABLE_BASKET"},"value":{"description":"Current value in base currency (USD)","type":"number","format":"float","example":1.0975},"calculated_at":{"type":"string","format":"date-time","example":"2024-01-01T12:00:00Z"},"component_values":{"description":"Breakdown of component values","type":"object","example":{"USD":{"value":1,"weight":40,"weighted_value":0.4},"EUR":{"value":1.1,"weight":35,"weighted_value":0.385},"GBP":{"value":1.25,"weight":25,"weighted_value":0.3125}}}},"type":"object"},"UserVotingPoll":{"title":"User Voting Poll","required":["uuid","title","type","status","options","start_date","end_date","user_context"],"properties":{"uuid":{"type":"string","format":"uuid","example":"990e8400-e29b-41d4-a716-446655440000"},"title":{"type":"string","example":"Monthly GCU Basket Allocation for June 2025"},"description":{"type":"string","example":"Vote on the currency allocation for the Global Currency Unit basket","nullable":true},"type":{"type":"string","example":"weighted_choice","enum":["single_choice","multiple_choice","weighted_choice","yes_no","ranked_choice"]},"status":{"type":"string","example":"active","enum":["draft","active","closed","cancelled"]},"options":{"type":"array","items":{"properties":{"id":{"type":"string","example":"USD"},"label":{"type":"string","example":"US Dollar"}},"type":"object"}},"start_date":{"type":"string","format":"date-time","example":"2025-06-01T00:00:00Z"},"end_date":{"type":"string","format":"date-time","example":"2025-06-08T00:00:00Z"},"required_participation":{"type":"number","format":"float","example":25,"nullable":true},"current_participation":{"type":"number","format":"float","example":15.5},"user_context":{"properties":{"has_voted":{"type":"boolean","example":false},"voting_power":{"type":"integer","example":1000},"can_vote":{"type":"boolean","example":true},"vote":{"properties":{"selected_options":{"type":"array","items":{"type":"string"}},"voted_at":{"type":"string","format":"date-time"}},"type":"object","nullable":true}},"type":"object"},"metadata":{"properties":{"is_gcu_poll":{"type":"boolean","example":true},"voting_month":{"type":"string","example":"2025-06","nullable":true},"template":{"type":"string","example":"monthly_gcu_allocation","nullable":true}},"type":"object"},"results_visible":{"type":"boolean","example":false},"time_remaining":{"properties":{"days":{"type":"integer","example":6},"hours":{"type":"integer","example":12},"human_readable":{"type":"string","example":"6 days from now"}},"type":"object","nullable":true}},"type":"object"},"Stablecoin":{"required":["code","name","symbol","pegged_currency","pegged_value","reserve_requirement","is_active"],"properties":{"code":{"description":"Unique stablecoin code","type":"string","example":"STABLE_LITAS"},"name":{"description":"Stablecoin name","type":"string","example":"Stable LITAS"},"symbol":{"description":"Trading symbol","type":"string","example":"sLITAS"},"peg_asset_code":{"description":"Asset the stablecoin is pegged to","type":"string","example":"EUR"},"peg_ratio":{"description":"Peg ratio","type":"string","example":"1.00000000"},"target_price":{"description":"Target price","type":"string","example":"1.00000000"},"stability_mechanism":{"type":"string","example":"collateralized","enum":["collateralized","algorithmic","hybrid"]},"collateral_ratio":{"description":"Required collateral ratio","type":"string","example":"1.5000"},"min_collateral_ratio":{"description":"Minimum collateral ratio before liquidation","type":"string","example":"1.2000"},"liquidation_penalty":{"description":"Liquidation penalty percentage","type":"string","example":"0.1000"},"total_supply":{"description":"Total supply in smallest unit","type":"integer","example":1000000},"max_supply":{"description":"Maximum supply limit","type":"integer","example":10000000},"total_collateral_value":{"description":"Total collateral value","type":"integer","example":1500000},"mint_fee":{"description":"Minting fee percentage","type":"string","example":"0.005000"},"burn_fee":{"description":"Burning fee percentage","type":"string","example":"0.003000"},"precision":{"description":"Decimal precision","type":"integer","example":2},"is_active":{"description":"Whether the stablecoin is active","type":"boolean","example":true},"minting_enabled":{"description":"Whether minting is enabled","type":"boolean","example":true},"burning_enabled":{"description":"Whether burning is enabled","type":"boolean","example":true},"metadata":{"description":"Additional metadata","type":"object"},"created_at":{"type":"string","format":"date-time","example":"2025-01-15T10:00:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2025-01-15T10:00:00Z"}},"type":"object"},"CreateStablecoinRequest":{"required":["code","name","symbol","pegged_currency","pegged_value","initial_reserve","reserve_requirement"],"properties":{"code":{"description":"Unique stablecoin code","type":"string","example":"STABLE_LITAS"},"name":{"description":"Stablecoin name","type":"string","example":"Stable LITAS"},"symbol":{"description":"Trading symbol","type":"string","example":"sLITAS"},"pegged_currency":{"description":"Currency to peg to","type":"string","example":"EUR"},"pegged_value":{"description":"Pegged value ratio","type":"number","example":1},"initial_reserve":{"description":"Initial reserve amount","type":"integer","example":1000000},"reserve_requirement":{"description":"Required reserve ratio","type":"number","example":1.1},"metadata":{"description":"Additional metadata","type":"object"}},"type":"object"},"MintStablecoinRequest":{"required":["account_uuid","amount"],"properties":{"account_uuid":{"description":"Account to mint tokens to","type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"amount":{"description":"Amount to mint in smallest unit","type":"integer","example":100000},"reference":{"description":"Reference for the minting operation","type":"string","example":"MINT-2025-001"},"metadata":{"description":"Additional metadata for the operation","type":"object"}},"type":"object"},"BurnStablecoinRequest":{"required":["account_uuid","amount"],"properties":{"account_uuid":{"description":"Account to burn tokens from","type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"amount":{"description":"Amount to burn in smallest unit","type":"integer","example":50000},"reference":{"description":"Reference for the burning operation","type":"string","example":"BURN-2025-001"},"metadata":{"description":"Additional metadata for the operation","type":"object"}},"type":"object"},"StablecoinOperation":{"required":["id","stablecoin_code","type","account_uuid","amount","status","reference"],"properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"stablecoin_code":{"type":"string","example":"STABLE_LITAS"},"type":{"type":"string","example":"mint","enum":["mint","burn","transfer"]},"account_uuid":{"type":"string","format":"uuid"},"amount":{"type":"integer","example":100000},"status":{"type":"string","example":"completed","enum":["pending","completed","failed","cancelled"]},"reference":{"type":"string","example":"MINT-2025-001"},"tx_hash":{"description":"Blockchain transaction hash if applicable","type":"string","example":"0x123...abc"},"metadata":{"type":"object"},"executed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}},"type":"object"},"StablecoinReserve":{"required":["stablecoin_code","reserve_amount","required_amount","reserve_ratio","is_compliant"],"properties":{"stablecoin_code":{"type":"string","example":"STABLE_LITAS"},"reserve_amount":{"description":"Current reserve amount","type":"integer","example":1100000},"required_amount":{"description":"Required reserve amount","type":"integer","example":1000000},"reserve_ratio":{"description":"Current reserve ratio","type":"number","example":1.1},"is_compliant":{"description":"Whether reserves meet requirements","type":"boolean","example":true},"last_audit_at":{"type":"string","format":"date-time"},"custodian_balances":{"type":"array","items":{"properties":{"custodian":{"type":"string","example":"deutsche_bank"},"amount":{"type":"integer","example":550000}},"type":"object"}}},"type":"object"},"LiquidationCheckResult":{"required":["can_liquidate","liquidation_amount","reserve_after","ratio_after"],"properties":{"can_liquidate":{"type":"boolean","example":true},"liquidation_amount":{"description":"Maximum amount that can be liquidated","type":"integer","example":50000},"current_reserve":{"type":"integer","example":1100000},"reserve_after":{"description":"Reserve after liquidation","type":"integer","example":1050000},"ratio_after":{"description":"Reserve ratio after liquidation","type":"number","example":1.05},"minimum_required_reserve":{"type":"integer","example":1000000}},"type":"object"},"WorkflowExecution":{"required":["id","workflow_name","status","started_at"],"properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"workflow_name":{"type":"string","example":"TransferWorkflow"},"status":{"type":"string","example":"completed","enum":["running","completed","failed","compensating","compensated"]},"input_data":{"description":"Workflow input parameters","type":"object"},"output_data":{"description":"Workflow output data","type":"object","nullable":true},"error":{"description":"Error message if failed","type":"string","nullable":true},"started_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time","nullable":true},"duration_ms":{"type":"integer","example":250},"steps":{"type":"array","items":{"properties":{"name":{"type":"string","example":"ValidateTransfer"},"status":{"type":"string","enum":["pending","running","completed","failed","compensated"]},"started_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"error":{"type":"string","nullable":true}},"type":"object"}}},"type":"object"},"WorkflowStatistics":{"required":["workflow_name","period","statistics"],"properties":{"workflow_name":{"type":"string","example":"TransferWorkflow"},"period":{"type":"string","example":"last_24_hours"},"statistics":{"properties":{"total_executions":{"type":"integer","example":1250},"successful":{"type":"integer","example":1200},"failed":{"type":"integer","example":45},"compensated":{"type":"integer","example":5},"average_duration_ms":{"type":"number","example":185.5},"min_duration_ms":{"type":"integer","example":50},"max_duration_ms":{"type":"integer","example":2500},"success_rate":{"type":"number","example":0.96}},"type":"object"},"failure_reasons":{"type":"array","items":{"properties":{"reason":{"type":"string","example":"Insufficient balance"},"count":{"type":"integer","example":30},"percentage":{"type":"number","example":0.667}},"type":"object"}}},"type":"object"},"CircuitBreakerStatus":{"required":["service","state","failure_count","last_checked"],"properties":{"service":{"type":"string","example":"paysera_connector"},"state":{"type":"string","example":"closed","enum":["closed","open","half_open"]},"failure_count":{"type":"integer","example":0},"success_count":{"type":"integer","example":150},"threshold":{"description":"Failures before opening","type":"integer","example":5},"timeout":{"description":"Seconds before half-open","type":"integer","example":60},"last_failure":{"type":"string","format":"date-time","nullable":true},"last_success":{"type":"string","format":"date-time","nullable":true},"last_checked":{"type":"string","format":"date-time"},"next_retry":{"type":"string","format":"date-time","nullable":true},"metadata":{"properties":{"error_rate":{"type":"number","example":0.01},"average_response_time_ms":{"type":"number","example":120.5}},"type":"object"}},"type":"object"},"EventReplayRequest":{"required":["aggregate_uuid","from_version"],"properties":{"aggregate_uuid":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"from_version":{"description":"Starting version to replay from","type":"integer","example":1},"to_version":{"description":"Ending version to replay to","type":"integer","example":100,"nullable":true},"event_types":{"description":"Filter by specific event types","type":"array","items":{"type":"string"},"nullable":true},"dry_run":{"description":"Simulate replay without applying changes","type":"boolean","example":false}},"type":"object"},"EventReplayResult":{"required":["aggregate_uuid","events_replayed","status"],"properties":{"aggregate_uuid":{"type":"string","format":"uuid"},"events_replayed":{"type":"integer","example":50},"status":{"type":"string","example":"completed","enum":["completed","failed","partial"]},"final_state":{"description":"Final aggregate state after replay","type":"object"},"errors":{"description":"Any errors encountered","type":"array","items":{"type":"string"}},"duration_ms":{"type":"integer","example":450},"dry_run":{"type":"boolean","example":false}},"type":"object"},"QueueMetrics":{"required":["queue_name","metrics"],"properties":{"queue_name":{"type":"string","example":"transactions"},"metrics":{"properties":{"size":{"description":"Current queue size","type":"integer","example":125},"processing_rate":{"description":"Jobs per second","type":"number","example":15.5},"average_wait_time_ms":{"type":"number","example":850},"failed_jobs_24h":{"type":"integer","example":12},"workers":{"description":"Active workers","type":"integer","example":4},"memory_usage_mb":{"type":"number","example":256.5}},"type":"object"},"job_types":{"type":"array","items":{"properties":{"type":{"type":"string","example":"ProcessTransferJob"},"count":{"type":"integer","example":45},"average_duration_ms":{"type":"number","example":120}},"type":"object"}}},"type":"object"},"TreasuryPortfolio":{"description":"A treasury portfolio containing asset allocations","properties":{"portfolio_id":{"description":"Treasury API Documentation Schemas.","type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"treasury_id":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440001"},"name":{"type":"string","example":"Main Treasury Portfolio"},"status":{"type":"string","example":"active","enum":["active","inactive","rebalancing","liquidating"]},"total_value":{"type":"number","format":"float","example":1000000},"asset_count":{"type":"integer","example":5},"is_rebalancing":{"type":"boolean","example":false},"last_rebalance_date":{"type":"string","format":"date-time","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"TreasuryPortfolioDetailed":{"description":"Detailed treasury portfolio with summary and rebalancing status","type":"object","allOf":[{"$ref":"#\/components\/schemas\/TreasuryPortfolio"},{"properties":{"strategy":{"properties":{"type":{"type":"string","example":"balanced"},"risk_tolerance":{"type":"string","example":"moderate"},"target_allocations":{"type":"object"}},"type":"object"},"asset_allocations":{"type":"array","items":{"$ref":"#\/components\/schemas\/AssetAllocation"}},"latest_metrics":{"type":"object"},"summary":{"type":"object"},"needs_rebalancing":{"type":"boolean","example":false}},"type":"object"}]},"CreateTreasuryPortfolioRequest":{"required":["treasury_id","name","strategy"],"properties":{"treasury_id":{"description":"ID of the treasury account","type":"string","format":"uuid"},"name":{"description":"Portfolio name","type":"string","example":"Growth Portfolio"},"strategy":{"required":["type"],"properties":{"type":{"type":"string","example":"balanced","enum":["conservative","balanced","aggressive","custom"]},"risk_tolerance":{"type":"string","example":"moderate","enum":["low","moderate","high"]},"target_allocations":{"properties":{"USD":{"type":"number","format":"float","example":40},"EUR":{"type":"number","format":"float","example":30},"GCU":{"type":"number","format":"float","example":30}},"type":"object"},"rebalancing_threshold":{"description":"Percentage deviation threshold for rebalancing","type":"number","format":"float","example":5}},"type":"object"}},"type":"object"},"UpdateTreasuryPortfolioRequest":{"required":["strategy"],"properties":{"strategy":{"properties":{"type":{"type":"string","example":"balanced","enum":["conservative","balanced","aggressive","custom"]},"risk_tolerance":{"type":"string","example":"moderate","enum":["low","moderate","high"]},"target_allocations":{"type":"object"},"rebalancing_threshold":{"type":"number","format":"float","example":5}},"type":"object"}},"type":"object"},"AllocateAssetsRequest":{"required":["allocations"],"properties":{"allocations":{"type":"array","items":{"properties":{"asset_symbol":{"type":"string","example":"USD"},"target_percentage":{"type":"number","format":"float","example":40},"quantity":{"type":"number","format":"float","example":400000}},"type":"object"}}},"type":"object"},"AssetAllocation":{"description":"An asset allocation within a treasury portfolio","properties":{"asset_id":{"type":"string","format":"uuid"},"asset_symbol":{"type":"string","example":"USD"},"asset_type":{"type":"string","example":"fiat","enum":["fiat","crypto","stablecoin","commodity"]},"quantity":{"type":"number","format":"float","example":500000},"current_value":{"type":"number","format":"float","example":500000},"target_percentage":{"type":"number","format":"float","example":50},"current_percentage":{"type":"number","format":"float","example":48.5},"deviation":{"type":"number","format":"float","example":-1.5}},"type":"object"},"TriggerRebalancingRequest":{"properties":{"reason":{"description":"Reason for triggering rebalancing","type":"string","example":"manual_trigger"}},"type":"object"},"RebalancingPlan":{"description":"Treasury portfolio rebalancing plan","properties":{"plan_id":{"type":"string","format":"uuid"},"portfolio_id":{"type":"string","format":"uuid"},"status":{"type":"string","example":"pending","enum":["pending","approved","executing","completed","cancelled"]},"trades":{"type":"array","items":{"properties":{"asset_symbol":{"type":"string"},"action":{"type":"string","enum":["buy","sell"]},"quantity":{"type":"number","format":"float"},"estimated_value":{"type":"number","format":"float"}},"type":"object"}},"estimated_cost":{"type":"number","format":"float","example":50},"current_allocations":{"type":"array","items":{"$ref":"#\/components\/schemas\/AssetAllocation"}},"target_allocations":{"type":"object"},"created_at":{"type":"string","format":"date-time"},"approved_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"},"ApproveRebalancingRequest":{"required":["plan"],"properties":{"plan":{"properties":{"trades":{"type":"array","items":{"properties":{"asset_symbol":{"type":"string"},"action":{"type":"string","enum":["buy","sell"]},"quantity":{"type":"number","format":"float"}},"type":"object"}}},"type":"object"}},"type":"object"},"PortfolioPerformance":{"description":"Portfolio performance metrics","properties":{"portfolio_id":{"type":"string","format":"uuid"},"period":{"type":"string","example":"30d"},"performance":{"properties":{"starting_value":{"type":"number","format":"float","example":1000000},"ending_value":{"type":"number","format":"float","example":1050000},"absolute_return":{"type":"number","format":"float","example":50000},"percentage_return":{"type":"number","format":"float","example":5},"volatility":{"type":"number","format":"float","example":2.5},"sharpe_ratio":{"type":"number","format":"float","example":1.5}},"type":"object"},"rebalancing_metrics":{"properties":{"total_rebalances":{"type":"integer","example":3},"last_rebalance":{"type":"string","format":"date-time"},"deviation_score":{"type":"number","format":"float","example":2.1}},"type":"object"},"generated_at":{"type":"string","format":"date-time"}},"type":"object"},"PortfolioValuation":{"description":"Portfolio valuation details","properties":{"portfolio_id":{"type":"string","format":"uuid"},"valuation":{"properties":{"total_value":{"type":"number","format":"float","example":1000000},"currency":{"type":"string","example":"USD"},"assets":{"type":"array","items":{"properties":{"symbol":{"type":"string"},"quantity":{"type":"number","format":"float"},"unit_price":{"type":"number","format":"float"},"total_value":{"type":"number","format":"float"}},"type":"object"}}},"type":"object"},"timestamp":{"type":"string","format":"date-time"}},"type":"object"},"PortfolioHistory":{"description":"Portfolio historical data","properties":{"portfolio_id":{"type":"string","format":"uuid"},"type":{"type":"string","example":"all","enum":["rebalancing","performance","all"]},"history":{"properties":{"rebalancing":{"type":"array","items":{"properties":{"date":{"type":"string","format":"date-time"},"reason":{"type":"string"},"trades_executed":{"type":"integer"}},"type":"object"}},"performance":{"type":"array","items":{"properties":{"date":{"type":"string","format":"date"},"value":{"type":"number","format":"float"},"daily_return":{"type":"number","format":"float"}},"type":"object"}}},"type":"object"}},"type":"object"},"CreateReportRequest":{"required":["type","period"],"properties":{"type":{"type":"string","example":"summary","enum":["summary","detailed","compliance","performance"]},"period":{"description":"Report period (e.g., 7d, 30d, 90d, 1y)","type":"string","example":"30d"}},"type":"object"},"PortfolioReport":{"description":"Generated portfolio report","properties":{"report_id":{"type":"string","format":"uuid"},"portfolio_id":{"type":"string","format":"uuid"},"type":{"type":"string","example":"summary"},"period":{"type":"string","example":"30d"},"status":{"type":"string","example":"completed","enum":["pending","generating","completed","failed"]},"generated_at":{"type":"string","format":"date-time"},"download_url":{"type":"string","format":"uri","nullable":true}},"type":"object"},"V2Error":{"properties":{"message":{"description":"V2 API Documentation Schemas.","type":"string","example":"An error occurred"},"errors":{"type":"object"}},"type":"object"},"V2ValidationError":{"properties":{"message":{"type":"string","example":"The given data was invalid."},"errors":{"type":"object"}},"type":"object"},"V2Pagination":{"properties":{"current_page":{"type":"integer","example":1},"last_page":{"type":"integer","example":10},"per_page":{"type":"integer","example":20},"total":{"type":"integer","example":200},"from":{"type":"integer","example":1},"to":{"type":"integer","example":20}},"type":"object"},"BasketPerformance":{"properties":{"id":{"type":"integer"},"basket_code":{"type":"string"},"period_type":{"type":"string","enum":["hour","day","week","month","quarter","year","all_time"]},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"},"start_value":{"type":"number"},"end_value":{"type":"number"},"high_value":{"type":"number"},"low_value":{"type":"number"},"average_value":{"type":"number"},"return_value":{"type":"number"},"return_percentage":{"type":"number"},"formatted_return":{"type":"string"},"volatility":{"type":"number"},"sharpe_ratio":{"type":"number"},"max_drawdown":{"type":"number"},"performance_rating":{"type":"string"},"risk_rating":{"type":"string"},"annualized_return":{"type":"number"},"value_count":{"type":"integer"},"components":{"type":"array","items":{"$ref":"#\/components\/schemas\/ComponentPerformance"}}},"type":"object"},"ComponentPerformance":{"properties":{"id":{"type":"integer"},"basket_performance_id":{"type":"integer"},"asset_code":{"type":"string"},"asset_name":{"type":"string"},"start_weight":{"type":"number"},"end_weight":{"type":"number"},"average_weight":{"type":"number"},"weight_change":{"type":"number"},"contribution_value":{"type":"number"},"contribution_percentage":{"type":"number"},"formatted_contribution":{"type":"string"},"return_value":{"type":"number"},"return_percentage":{"type":"number"},"formatted_return":{"type":"string"},"is_positive_contributor":{"type":"boolean"}},"type":"object"}},"securitySchemes":{"sanctum":{"type":"http","description":"Enter token in format: Bearer {token}","scheme":"bearer"},"bearerAuth":{"type":"http","bearerFormat":"JWT","scheme":"bearer"}}},"tags":[{"name":"AI Query","description":"AI-powered natural language transaction queries and spending analysis"},{"name":"AI Agent","description":"AI Agent chat and conversation management for intelligent banking assistance"},{"name":"Account Balances","description":"APIs for managing multi-asset account balances"},{"name":"Agent Protocol - Authentication","description":"Agent authentication, API key management, and session handling"},{"name":"Agent Protocol - Escrow","description":"Escrow management for secure agent-to-agent transactions"},{"name":"Agent Protocol - Identity","description":"Agent registration, discovery, and identity management endpoints"},{"name":"Agent Protocol - Messaging","description":"Agent-to-Agent (A2A) messaging endpoints"},{"name":"Agent Protocol - Payments","description":"Agent payment initiation and management endpoints"},{"name":"Agent Protocol - Negotiation","description":"Protocol version negotiation and agreement management endpoints"},{"name":"Agent Protocol - Reputation","description":"Agent reputation and trust management endpoints"},{"name":"Assets","description":"Asset and currency management"},{"name":"Authentication","description":"User authentication and authorization"},{"name":"BIAN","description":"BIAN-compliant banking service operations"},{"name":"Bank Alerting","description":"Bank health monitoring and alerting system (Admin only)"},{"name":"Bank Allocation","description":"User bank allocation preferences and fund distribution management"},{"name":"Basket Operations","description":"Basket operations on accounts"},{"name":"Baskets","description":"Multi-asset basket operations"},{"name":"Basket Performance","description":"Basket asset performance tracking and analytics"},{"name":"Batch Processing","description":"End-of-day batch operations and bulk financial processing"},{"name":"Card Issuance","description":"Virtual card provisioning and cardholder management"},{"name":"Card Webhooks","description":"Card issuer webhook endpoints (internal)"},{"name":"Compliance Certification","description":"SOC 2, PCI DSS, data residency, and incident management endpoints"},{"name":"Custodians","description":"External custodian bank integration and account management"},{"name":"Custodian Webhooks","description":"Endpoints for receiving webhook notifications from custodian banks"},{"name":"Daily Reconciliation","description":"Bank account reconciliation and reporting system (Admin only)"},{"name":"DeFi","description":"Decentralized finance operations: DEX swaps, lending, staking, and yield optimization"},{"name":"Demo AI Chat","description":"Public demo AI chat endpoint (no authentication required)"},{"name":"Accounts","description":"Bank account management"},{"name":"Transactions","description":"Transaction operations and history"},{"name":"Transfers","description":"Money transfers between accounts"},{"name":"Balance","description":"Balance inquiry and account statistics"},{"name":"MCP Tools","description":"Model Context Protocol (MCP) tools management for AI agents"},{"name":"CrossChain","description":"Cross-chain bridge operations, multi-chain transfers, and cross-chain swaps"},{"name":"RegTech","description":"Regulatory Technology \u2014 compliance reporting, MiFID II, MiCA, Travel Rule"},{"name":"Mobile Payments","description":"Mobile payment intents, transactions, receipts, and wallet operations"},{"name":"Partner BaaS","description":"Partner Banking-as-a-Service dashboard, billing, SDK, widgets, and marketplace"},{"name":"Compliance","description":"Compliance management: violations, rules, certifications, and policy enforcement"},{"name":"Audit","description":"Audit trail: logs, events, reports, entity trails, and user activity"},{"name":"Fraud Detection","description":"Fraud detection: alerts, patterns, cases, and investigation workflows"},{"name":"Risk Management","description":"Risk analysis: user risk profiles, transaction scoring, device fingerprinting"},{"name":"Module Management","description":"Platform module management: enable, disable, health checks, and verification"},{"name":"WebAuthn","description":"WebAuthn\/FIDO2 passkey authentication: challenge, authenticate, and register"},{"name":"Account Deletion","description":"Account deletion and data removal requests"},{"name":"Banking V2","description":"V2 open banking integration: bank connections, account aggregation, and transfers"},{"name":"Blockchain Wallets","description":"Blockchain wallet management: create, backup, generate addresses, and view transactions"},{"name":"Compliance V2","description":"V2 KYC\/AML compliance: identity verification, document upload, risk profiling"},{"name":"BaaS Onboarding","description":"Financial institution onboarding: applications, document submission, and status tracking"},{"name":"TrustCert","description":"Trust certificates: applications, verification levels, requirements, and transaction limits"},{"name":"Commerce","description":"Mobile commerce: merchant discovery, QR payments, and payment processing"},{"name":"Relayer","description":"ERC-4337 gas relayer: user operations, gas estimation, and paymaster support"},{"name":"Mobile Wallet","description":"Mobile wallet: token balances, transaction history, address management, and transfers"},{"name":"Treasury","description":"Treasury management: liquidity forecasting, alerts, and workflow orchestration"},{"name":"Lending","description":"P2P lending: loan applications, payments, early settlement, and loan management"},{"name":"SMS"},{"name":"Machine Payments"},{"name":"SMS Webhooks"},{"name":"Exchange Rates","description":"Currency exchange rate information"},{"name":"Exchange Rate Providers","description":"Exchange rate provider management and rate comparison endpoints (stub)"},{"name":"External Exchange","description":"External exchange integration endpoints"},{"name":"External Exchanges","description":"External exchange connectors, tickers, and arbitrage endpoints (stub)"},{"name":"GDPR","description":"General Data Protection Regulation (GDPR) compliance operations"},{"name":"GDPR Enhanced","description":"GDPR Article 30, DPIA, Breach Notification, Consent v2, and Data Retention endpoints"},{"name":"Hardware Wallets","description":"Hardware wallet management and signing operations"},{"name":"KYC","description":"Know Your Customer (KYC) verification operations"},{"name":"Liquidity Pool","description":"Liquidity pool management endpoints"},{"name":"Mobile User Preferences","description":"Mobile application user preferences management"},{"name":"Mobile","description":"Mobile device management and authentication endpoints"},{"name":"Multi-Sig Wallets","description":"Multi-signature wallet management endpoints"},{"name":"Ondato Webhooks","description":"Endpoints for receiving webhook notifications from Ondato KYC"},{"name":"Plugin Marketplace","description":"Plugin management, security scanning, and marketplace endpoints"},{"name":"Governance - Polls","description":"Poll management and voting operations"},{"name":"Delegated Proofs","description":"Server-side ZK proof generation for low-end devices"},{"name":"Privacy","description":"Privacy pool Merkle tree and proof endpoints"},{"name":"Regulatory Reporting","description":"Compliance and regulatory report generation and management"},{"name":"Gas Relayer","description":"Meta-transaction relayer for gasless stablecoin transfers"},{"name":"Smart Accounts","description":"ERC-4337 account abstraction management"},{"name":"Settings","description":"Application settings management"},{"name":"Stablecoins","description":"Stablecoin management and operations"},{"name":"Stablecoin Operations","description":"Stablecoin minting, burning, and collateral management"},{"name":"Stablecoin Operations (Stub)","description":"Stablecoin minting, burning, collateral, and liquidation endpoints (stub)"},{"name":"Sub-Products","description":"Sub-product status and configuration endpoints"},{"name":"Transaction Reversal","description":"Critical transaction reversal operations for error recovery"},{"name":"Treasury Portfolio","description":"Treasury portfolio management operations"},{"name":"TrustCert Certificates","description":"TrustCert certificate viewing and export endpoints"},{"name":"TrustCert Presentation","description":"Generate and verify TrustCert credential presentations"},{"name":"User Voting","description":"User-friendly voting interface for GCU governance"},{"name":"GCU","description":"Global Currency Unit operations"},{"name":"GCU Trading","description":"Buy and sell Global Currency Unit operations"},{"name":"Public API","description":"Public API endpoints for external developers"},{"name":"Webhooks","description":"Webhook management for real-time event notifications"},{"name":"Governance - Votes","description":"Vote management and history operations"},{"name":"WebSocket Subscriptions","description":"Manage paid WebSocket channel subscriptions"},{"name":"WebSocket","description":"WebSocket configuration and channel management"},{"name":"Workflow Monitoring","description":"Monitor and manage workflow executions, compensations, and saga patterns"},{"name":"X402 Endpoints","description":"Manage monetized API endpoints"},{"name":"X402 Payments","description":"X402 payment history and analytics"},{"name":"X402 Spending Limits","description":"Agent spending limit management for x402 payments"},{"name":"X402 Protocol","description":"HTTP 402 Payment Protocol - native micropayments for APIs"},{"name":"FinCard Webhooks","description":"FinCard Webhooks"},{"name":"Subscription","description":"Subscription"},{"name":"AI Agents","description":"AI Agents"},{"name":"Compliance Alerts","description":"Compliance Alerts"},{"name":"Compliance Cases","description":"Compliance Cases"},{"name":"Exchange","description":"Exchange"},{"name":"Metrics","description":"Metrics"},{"name":"Monitoring","description":"Monitoring"},{"name":"Rewards","description":"Rewards"},{"name":"Transaction Monitoring","description":"Transaction Monitoring"},{"name":"User","description":"User"},{"name":"Banners","description":"Banners"},{"name":"Bridge Setup","description":"Bridge Setup"},{"name":"Bridge Webhooks","description":"Bridge Webhooks"},{"name":"Notifications","description":"Notifications"},{"name":"Ramp","description":"Ramp"},{"name":"Referrals","description":"Referrals"},{"name":"Sponsorship","description":"Sponsorship"},{"name":"GCU Voting","description":"GCU Voting"},{"name":"Virtuals Agents","description":"Virtuals Agents"}]}