{"openapi":"3.1.0","info":{"title":"Omnexa API","description":"Hub autonomo per SaaS, campagne e vendite. Importi in centesimi.","version":"0.1.0"},"paths":{"/health/live":{"get":{"tags":["health"],"summary":"Live","operationId":"live_health_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/ready":{"get":{"tags":["health"],"summary":"Ready","operationId":"ready_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/mfa/verify":{"post":{"tags":["auth"],"summary":"Verify","operationId":"verify_api_v1_auth_mfa_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaVerify"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/mfa/email":{"post":{"tags":["auth"],"summary":"Email","operationId":"email_api_v1_auth_mfa_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaChallengeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/security":{"get":{"tags":["auth"],"summary":"Status","operationId":"status_api_v1_auth_security_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/security/email-proof":{"post":{"tags":["auth"],"summary":"Email Proof","operationId":"email_proof_api_v1_auth_security_email_proof_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaProof"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/security/totp/begin":{"post":{"tags":["auth"],"summary":"Totp Begin","operationId":"totp_begin_api_v1_auth_security_totp_begin_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaProof"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/security/totp/confirm":{"post":{"tags":["auth"],"summary":"Totp Confirm","operationId":"totp_confirm_api_v1_auth_security_totp_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaCode"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/security/email/begin":{"post":{"tags":["auth"],"summary":"Email Begin","operationId":"email_begin_api_v1_auth_security_email_begin_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaProof"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/security/email/confirm":{"post":{"tags":["auth"],"summary":"Email Confirm","operationId":"email_confirm_api_v1_auth_security_email_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaVerify"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/security/recovery":{"post":{"tags":["auth"],"summary":"Recovery","operationId":"recovery_api_v1_auth_security_recovery_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaProof"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/security/disable":{"post":{"tags":["auth"],"summary":"Disable","operationId":"disable_api_v1_auth_security_disable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaDisable"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_api_v1_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_api_v1_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/users":{"get":{"tags":["access"],"summary":"Users","operationId":"users_api_v1_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["access"],"summary":"Add User","operationId":"add_user_api_v1_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{id}/deactivate":{"patch":{"tags":["access"],"summary":"Deactivate User","operationId":"deactivate_user_api_v1_users__id__deactivate_patch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tokens":{"get":{"tags":["access"],"summary":"Tokens","operationId":"tokens_api_v1_tokens_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["access"],"summary":"Create Token","operationId":"create_token_api_v1_tokens_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tokens/{id}":{"delete":{"tags":["access"],"summary":"Revoke Token","operationId":"revoke_token_api_v1_tokens__id__delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/saas":{"get":{"tags":["saas"],"summary":"List Saas","operationId":"list_saas_api_v1_saas_get","parameters":[{"name":"saas_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saas Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["saas"],"summary":"Create Saas","operationId":"create_saas_api_v1_saas_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaasIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/saas/{id}":{"get":{"tags":["saas"],"summary":"Read Saas","operationId":"read_saas_api_v1_saas__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customers":{"get":{"tags":["customers"],"summary":"List Customers","operationId":"list_customers_api_v1_customers_get","parameters":[{"name":"saas_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saas Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["customers"],"summary":"Create Customers","operationId":"create_customers_api_v1_customers_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customers/{id}":{"get":{"tags":["customers"],"summary":"Read Customers","operationId":"read_customers_api_v1_customers__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sellers":{"get":{"tags":["sellers"],"summary":"List Sellers","operationId":"list_sellers_api_v1_sellers_get","parameters":[{"name":"saas_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saas Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["sellers"],"summary":"Create Sellers","operationId":"create_sellers_api_v1_sellers_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sellers/{id}":{"get":{"tags":["sellers"],"summary":"Read Sellers","operationId":"read_sellers_api_v1_sellers__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaigns":{"get":{"tags":["campaigns"],"summary":"List Campaigns","operationId":"list_campaigns_api_v1_campaigns_get","parameters":[{"name":"saas_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saas Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["campaigns"],"summary":"Create Campaigns","operationId":"create_campaigns_api_v1_campaigns_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaigns/{id}":{"get":{"tags":["campaigns"],"summary":"Read Campaigns","operationId":"read_campaigns_api_v1_campaigns__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["campaigns"],"summary":"Edit Campaign","operationId":"edit_campaign_api_v1_campaigns__id__patch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/leads":{"get":{"tags":["leads"],"summary":"List Leads","operationId":"list_leads_api_v1_leads_get","parameters":[{"name":"saas_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saas Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["leads"],"summary":"Create Leads","operationId":"create_leads_api_v1_leads_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/leads/{id}":{"get":{"tags":["leads"],"summary":"Read Leads","operationId":"read_leads_api_v1_leads__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["leads"],"summary":"Edit Lead","operationId":"edit_lead_api_v1_leads__id__patch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sales":{"get":{"tags":["sales"],"summary":"List Sales","operationId":"list_sales_api_v1_sales_get","parameters":[{"name":"saas_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saas Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["sales"],"summary":"Create Sales","operationId":"create_sales_api_v1_sales_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sales/{id}":{"get":{"tags":["sales"],"summary":"Read Sales","operationId":"read_sales_api_v1_sales__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/saas/{id}/archive":{"patch":{"tags":["saas"],"summary":"Archive","operationId":"archive_api_v1_saas__id__archive_patch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sales/{id}/payments":{"post":{"tags":["sales"],"summary":"Payment","operationId":"payment_api_v1_sales__id__payments_post","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["sales"],"summary":"Payment List","operationId":"payment_list_api_v1_sales__id__payments_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sales/{id}/cancel":{"patch":{"tags":["sales"],"summary":"Cancel","operationId":"cancel_api_v1_sales__id__cancel_patch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports":{"get":{"tags":["reports"],"summary":"Reporting","operationId":"reporting_api_v1_reports_get","parameters":[{"name":"saas_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saas Id"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit":{"get":{"tags":["audit"],"summary":"Audit List","operationId":"audit_list_api_v1_audit_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connectors":{"get":{"tags":["connectors"],"summary":"Connector List","operationId":"connector_list_api_v1_connectors_get","parameters":[{"name":"saas_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saas Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["connectors"],"summary":"Connector Create","operationId":"connector_create_api_v1_connectors_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connectors/{id}":{"get":{"tags":["connectors"],"summary":"Connector Read","operationId":"connector_read_api_v1_connectors__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["connectors"],"summary":"Connector Edit","operationId":"connector_edit_api_v1_connectors__id__patch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connectors/{id}/sync":{"post":{"tags":["connectors"],"summary":"Connector Sync","operationId":"connector_sync_api_v1_connectors__id__sync_post","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connectors/{id}/records":{"get":{"tags":["connectors"],"summary":"Connector Records","operationId":"connector_records_api_v1_connectors__id__records_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","pattern":"^(customer|subscription|invoice|reseller|event|plan)$","default":"customer","title":"Kind"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connections":{"get":{"tags":["integrations"],"summary":"Connections","operationId":"connections_api_v1_connections_get","parameters":[{"name":"saas_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saas Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["integrations"],"summary":"Add Connection","operationId":"add_connection_api_v1_connections_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connections/{id}":{"delete":{"tags":["integrations"],"summary":"Disable Connection","operationId":"disable_connection_api_v1_connections__id__delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connections/{id}/events":{"get":{"tags":["integrations"],"summary":"Events List","operationId":"events_list_api_v1_connections__id__events_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["integrations"],"summary":"Event","operationId":"event_api_v1_connections__id__events_post","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CampaignIn":{"properties":{"saas_id":{"type":"string","maxLength":36,"minLength":36,"title":"Saas Id"},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"channel":{"type":"string","maxLength":120,"minLength":1,"title":"Channel"},"currency":{"type":"string","enum":["EUR","USD","GBP","CHF"],"title":"Currency","default":"EUR"},"budget_cents":{"type":"integer","maximum":1000000000.0,"minimum":0.0,"title":"Budget Cents","default":0},"spent_cents":{"type":"integer","maximum":1000000000.0,"minimum":0.0,"title":"Spent Cents","default":0},"status":{"type":"string","enum":["draft","active","paused","completed"],"title":"Status","default":"draft"}},"additionalProperties":false,"type":"object","required":["saas_id","name","channel"],"title":"CampaignIn"},"CampaignPatch":{"properties":{"budget_cents":{"anyOf":[{"type":"integer","maximum":1000000000.0,"minimum":0.0},{"type":"null"}],"title":"Budget Cents"},"spent_cents":{"anyOf":[{"type":"integer","maximum":1000000000.0,"minimum":0.0},{"type":"null"}],"title":"Spent Cents"},"status":{"anyOf":[{"type":"string","enum":["draft","active","paused","completed"]},{"type":"null"}],"title":"Status"}},"additionalProperties":false,"type":"object","title":"CampaignPatch"},"ConnectionIn":{"properties":{"saas_id":{"type":"string","maxLength":36,"minLength":36,"title":"Saas Id"},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"}},"additionalProperties":false,"type":"object","required":["saas_id","name"],"title":"ConnectionIn"},"ConnectorIn":{"properties":{"saas_id":{"type":"string","maxLength":36,"minLength":36,"title":"Saas Id"},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"provider":{"type":"string","enum":["call_center","wiki"],"title":"Provider","default":"call_center"},"base_url":{"type":"string","maxLength":300,"title":"Base Url"},"credential_ref":{"type":"string","pattern":"^[a-z][a-z0-9_-]{2,63}$","title":"Credential Ref"}},"additionalProperties":false,"type":"object","required":["saas_id","name","base_url","credential_ref"],"title":"ConnectorIn"},"ConnectorPatch":{"properties":{"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"credential_ref":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_-]{2,63}$"},{"type":"null"}],"title":"Credential Ref"},"reset_feed":{"type":"boolean","title":"Reset Feed","default":false}},"additionalProperties":false,"type":"object","title":"ConnectorPatch"},"CustomerIn":{"properties":{"saas_id":{"type":"string","maxLength":36,"minLength":36,"title":"Saas Id"},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"email":{"type":"string","maxLength":254,"title":"Email","default":""},"company":{"type":"string","maxLength":120,"title":"Company","default":""},"seller_id":{"anyOf":[{"type":"string","maxLength":36,"minLength":36},{"type":"null"}],"title":"Seller Id"}},"additionalProperties":false,"type":"object","required":["saas_id","name"],"title":"CustomerIn"},"EventIn":{"properties":{"external_id":{"type":"string","maxLength":200,"minLength":1,"title":"External Id"},"type":{"type":"string","enum":["heartbeat","lead.created","sale.created","payment.recorded"],"title":"Type"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"additionalProperties":false,"type":"object","required":["external_id","type"],"title":"EventIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LeadIn":{"properties":{"saas_id":{"type":"string","maxLength":36,"minLength":36,"title":"Saas Id"},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"email":{"type":"string","maxLength":254,"title":"Email","default":""},"source":{"type":"string","maxLength":120,"minLength":1,"title":"Source","default":"non_attribuita"},"campaign_id":{"anyOf":[{"type":"string","maxLength":36,"minLength":36},{"type":"null"}],"title":"Campaign Id"},"seller_id":{"anyOf":[{"type":"string","maxLength":36,"minLength":36},{"type":"null"}],"title":"Seller Id"}},"additionalProperties":false,"type":"object","required":["saas_id","name"],"title":"LeadIn"},"LeadPatch":{"properties":{"status":{"anyOf":[{"type":"string","enum":["new","qualified","lost"]},{"type":"null"}],"title":"Status"},"seller_id":{"anyOf":[{"type":"string","maxLength":36,"minLength":36},{"type":"null"}],"title":"Seller Id"}},"additionalProperties":false,"type":"object","title":"LeadPatch"},"Login":{"properties":{"email":{"type":"string","maxLength":254,"minLength":3,"title":"Email"},"password":{"type":"string","maxLength":1024,"minLength":1,"title":"Password"}},"additionalProperties":false,"type":"object","required":["email","password"],"title":"Login"},"MfaChallengeIn":{"properties":{"challenge":{"type":"string","maxLength":100,"minLength":40,"title":"Challenge"}},"additionalProperties":false,"type":"object","required":["challenge"],"title":"MfaChallengeIn"},"MfaCode":{"properties":{"code":{"type":"string","pattern":"^[0-9]{6}$","title":"Code"}},"additionalProperties":false,"type":"object","required":["code"],"title":"MfaCode"},"MfaDisable":{"properties":{"password":{"type":"string","maxLength":1024,"minLength":1,"title":"Password"},"method":{"type":"string","enum":["totp","email","recovery"],"title":"Method","default":"totp"},"code":{"type":"string","maxLength":32,"title":"Code","default":""},"challenge":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Challenge"},"factor":{"type":"string","enum":["totp","email"],"title":"Factor"}},"additionalProperties":false,"type":"object","required":["password","factor"],"title":"MfaDisable"},"MfaProof":{"properties":{"password":{"type":"string","maxLength":1024,"minLength":1,"title":"Password"},"method":{"type":"string","enum":["totp","email","recovery"],"title":"Method","default":"totp"},"code":{"type":"string","maxLength":32,"title":"Code","default":""},"challenge":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Challenge"}},"additionalProperties":false,"type":"object","required":["password"],"title":"MfaProof"},"MfaVerify":{"properties":{"challenge":{"type":"string","maxLength":100,"minLength":40,"title":"Challenge"},"method":{"type":"string","enum":["totp","email","recovery"],"title":"Method"},"code":{"type":"string","maxLength":32,"minLength":6,"title":"Code"}},"additionalProperties":false,"type":"object","required":["challenge","method","code"],"title":"MfaVerify"},"PaymentIn":{"properties":{"kind":{"type":"string","enum":["receipt","refund"],"title":"Kind"},"amount_cents":{"type":"integer","maximum":1000000000.0,"exclusiveMinimum":0.0,"title":"Amount Cents"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"reference":{"type":"string","maxLength":200,"minLength":1,"title":"Reference"}},"additionalProperties":false,"type":"object","required":["kind","amount_cents","occurred_at","reference"],"title":"PaymentIn"},"SaasIn":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description","default":""},"website":{"type":"string","maxLength":500,"title":"Website","default":""}},"additionalProperties":false,"type":"object","required":["name"],"title":"SaasIn"},"SaleIn":{"properties":{"saas_id":{"type":"string","maxLength":36,"minLength":36,"title":"Saas Id"},"customer_id":{"type":"string","maxLength":36,"minLength":36,"title":"Customer Id"},"description":{"type":"string","maxLength":200,"minLength":1,"title":"Description"},"amount_cents":{"type":"integer","maximum":1000000000.0,"exclusiveMinimum":0.0,"title":"Amount Cents"},"currency":{"type":"string","enum":["EUR","USD","GBP","CHF"],"title":"Currency","default":"EUR"},"seller_id":{"anyOf":[{"type":"string","maxLength":36,"minLength":36},{"type":"null"}],"title":"Seller Id"},"campaign_id":{"anyOf":[{"type":"string","maxLength":36,"minLength":36},{"type":"null"}],"title":"Campaign Id"},"lead_id":{"anyOf":[{"type":"string","maxLength":36,"minLength":36},{"type":"null"}],"title":"Lead Id"},"external_ref":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"External Ref"}},"additionalProperties":false,"type":"object","required":["saas_id","customer_id","description","amount_cents"],"title":"SaleIn"},"SellerIn":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"email":{"type":"string","maxLength":254,"title":"Email","default":""},"user_id":{"anyOf":[{"type":"string","maxLength":36,"minLength":36},{"type":"null"}],"title":"User Id"},"commission_bps":{"type":"integer","maximum":10000.0,"minimum":0.0,"title":"Commission Bps","default":0}},"additionalProperties":false,"type":"object","required":["name"],"title":"SellerIn"},"TokenIn":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"scopes":{"items":{"type":"string","enum":["read","write","reports","mcp"]},"type":"array","maxItems":4,"minItems":1,"title":"Scopes"},"saas_ids":{"anyOf":[{"items":{"type":"string","maxLength":36,"minLength":36},"type":"array","maxItems":100,"minItems":1},{"type":"null"}],"title":"Saas Ids"},"days":{"type":"integer","maximum":90.0,"minimum":1.0,"title":"Days","default":30}},"additionalProperties":false,"type":"object","required":["name","scopes"],"title":"TokenIn"},"UserIn":{"properties":{"email":{"type":"string","maxLength":254,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$","title":"Email"},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"password":{"type":"string","maxLength":1024,"minLength":12,"title":"Password"},"role":{"type":"string","enum":["admin","manager","analyst","seller"],"title":"Role"}},"additionalProperties":false,"type":"object","required":["email","name","password","role"],"title":"UserIn"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}