{"openapi":"3.1.0","info":{"title":"Facturación Ccurity — API CFDI 4.0","description":"Plataforma SaaS multi-empresa y API-First de Facturación Electrónica en México (CFDI 4.0, REP 2.0, Cancelación RMF 2026, PAC Directo y Motor Híbrido de Cobros).","version":"0.1.0"},"paths":{"/api/v1/auth/register":{"post":{"tags":["Autenticación SaaS"],"summary":"Register","operationId":"register_api_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["Autenticación SaaS"],"summary":"Login","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/refresh":{"post":{"tags":["Autenticación SaaS"],"summary":"Refresh","operationId":"refresh_api_v1_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["Autenticación SaaS"],"summary":"Get Me","operationId":"get_me_api_v1_auth_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/change-password":{"post":{"tags":["Autenticación SaaS"],"summary":"Change Password","operationId":"change_password_api_v1_auth_change_password_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/demo-bootstrap":{"post":{"tags":["Autenticación SaaS"],"summary":"Demo Bootstrap","description":"Crea o inicia sesión en una cuenta Demo Sandbox completa con CSD, clientes,\nfacturas timbradas (PUE y PPD) y órdenes de pago listas para confirmar.\nSolo disponible fuera de producción.","operationId":"demo_bootstrap_api_v1_auth_demo_bootstrap_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}}}}},"/api/v1/tenants":{"post":{"tags":["Organizaciones Multi-Tenant"],"summary":"Create Tenant","description":"Permite a perfiles Contador y Cuenta Maestra administrar múltiples empresas (Multi-RFC).","operationId":"create_tenant_api_v1_tenants_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/current":{"get":{"tags":["Organizaciones Multi-Tenant"],"summary":"Get Current Tenant","operationId":"get_current_tenant_api_v1_tenants_current_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Organizaciones Multi-Tenant"],"summary":"Update Current Tenant","operationId":"update_current_tenant_api_v1_tenants_current_patch","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/current/dashboard":{"get":{"tags":["Organizaciones Multi-Tenant"],"summary":"Get Dashboard Metrics","operationId":"get_dashboard_metrics_api_v1_tenants_current_dashboard_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/current/timbres":{"get":{"tags":["Organizaciones Multi-Tenant"],"summary":"Get Timbre Ledger","operationId":"get_timbre_ledger_api_v1_tenants_current_timbres_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/current/timbres/topup":{"post":{"tags":["Organizaciones Multi-Tenant"],"summary":"Topup Timbres","operationId":"topup_timbres_api_v1_tenants_current_timbres_topup_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimbreTopupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/current/team":{"get":{"tags":["Organizaciones Multi-Tenant"],"summary":"List Team Members","operationId":"list_team_members_api_v1_tenants_current_team_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Organizaciones Multi-Tenant"],"summary":"Add Team Member","operationId":"add_team_member_api_v1_tenants_current_team_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberInviteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/current/audit-logs":{"get":{"tags":["Organizaciones Multi-Tenant"],"summary":"Get Audit Logs","operationId":"get_audit_logs_api_v1_tenants_current_audit_logs_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/current/email/test":{"post":{"tags":["Organizaciones Multi-Tenant"],"summary":"Send Test Email","description":"Envía un correo de prueba corporativo para verificar Resend/SMTP en vivo.","operationId":"send_test_email_api_v1_tenants_current_email_test_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/current/system-status":{"get":{"tags":["Organizaciones Multi-Tenant"],"summary":"Get System Status","description":"Retorna estado operativo en vivo: correo (Resend/SMTP), PAC, bóveda y respaldos automáticos.","operationId":"get_system_status_api_v1_tenants_current_system_status_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/master/overview":{"get":{"tags":["Organizaciones Multi-Tenant"],"summary":"Get Master Overview","description":"Panel maestro del intermediario Ccurity: pool PAC, todas las organizaciones, usuarios y saldos.","operationId":"get_master_overview_api_v1_tenants_master_overview_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/master/allocate-timbres":{"post":{"tags":["Organizaciones Multi-Tenant"],"summary":"Master Allocate Timbres","description":"Asigna o ajusta timbres desde el intermediario maestro Ccurity a cualquier empresa registrada.","operationId":"master_allocate_timbres_api_v1_tenants_master_allocate_timbres_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MasterAllocateTimbresRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/master/users/{user_id}/profile":{"patch":{"tags":["Organizaciones Multi-Tenant"],"summary":"Master Update User Profile","description":"Permite a la cuenta maestra promover o cambiar el perfil de un usuario (client / accountant / master).","operationId":"master_update_user_profile_api_v1_tenants_master_users__user_id__profile_patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MasterUpdateUserProfileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/csd":{"get":{"tags":["Certificados de Sello Digital (CSD)"],"summary":"List Csds","operationId":"list_csds_api_v1_csd_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CsdOut"},"title":"Response List Csds Api V1 Csd Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/csd/upload":{"post":{"tags":["Certificados de Sello Digital (CSD)"],"summary":"Upload Csd","operationId":"upload_csd_api_v1_csd_upload_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_csd_api_v1_csd_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsdOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/csd/generate-sandbox":{"post":{"tags":["Certificados de Sello Digital (CSD)"],"summary":"Generate Sandbox Csd Endpoint","description":"Genera e instala un CSD de pruebas SAT para timbrado Sandbox sin subir archivos reales.","operationId":"generate_sandbox_csd_endpoint_api_v1_csd_generate_sandbox_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsdOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/catalogs/{catalog_key}":{"get":{"tags":["Catálogos Oficiales SAT"],"summary":"Query Sat Catalog","operationId":"query_sat_catalog_api_v1_catalogs__catalog_key__get","parameters":[{"name":"catalog_key","in":"path","required":true,"schema":{"type":"string","title":"Catalog Key"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":120,"default":"","title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":30,"title":"Limit"}},{"name":"regimen_fiscal","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regimen Fiscal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/clients":{"get":{"tags":["Clientes (Receptores CFDI 4.0)"],"summary":"List Clients","operationId":"list_clients_api_v1_clients_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":120,"default":"","title":"Q"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClientOut"},"title":"Response List Clients Api V1 Clients Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Clientes (Receptores CFDI 4.0)"],"summary":"Create Client","operationId":"create_client_api_v1_clients_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/clients/{client_id}":{"get":{"tags":["Clientes (Receptores CFDI 4.0)"],"summary":"Get Client","operationId":"get_client_api_v1_clients__client_id__get","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Clientes (Receptores CFDI 4.0)"],"summary":"Update Client","operationId":"update_client_api_v1_clients__client_id__patch","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Clientes (Receptores CFDI 4.0)"],"summary":"Delete Client","operationId":"delete_client_api_v1_clients__client_id__delete","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/products":{"get":{"tags":["Productos y Servicios"],"summary":"List Products","operationId":"list_products_api_v1_products_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":120,"default":"","title":"Q"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductOut"},"title":"Response List Products Api V1 Products Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Productos y Servicios"],"summary":"Create Product","operationId":"create_product_api_v1_products_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/products/{product_id}":{"patch":{"tags":["Productos y Servicios"],"summary":"Update Product","operationId":"update_product_api_v1_products__product_id__patch","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Productos y Servicios"],"summary":"Delete Product","operationId":"delete_product_api_v1_products__product_id__delete","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices":{"get":{"tags":["Facturación CFDI 4.0 y Bóveda"],"summary":"List Invoices","operationId":"list_invoices_api_v1_invoices_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"tipo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tipo"}},{"name":"metodo_pago","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metodo Pago"}},{"name":"only_unpaid","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Only Unpaid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":120,"default":"","title":"Q"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceOut"},"title":"Response List Invoices Api V1 Invoices Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Facturación CFDI 4.0 y Bóveda"],"summary":"Create Invoice","description":"Crea un borrador CFDI 4.0 o lo timbra inmediatamente si `stamp_immediately=true`.\n\nSoporta cabecera `Idempotency-Key` para integraciones seguras desde apps externas.","operationId":"create_invoice_api_v1_invoices_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/rep":{"post":{"tags":["Facturación CFDI 4.0 y Bóveda"],"summary":"Emit Rep20","description":"Emite y timbra un Complemento para Recepción de Pagos (REP 2.0) sobre una factura PPD.","operationId":"emit_rep20_api_v1_invoices_rep_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/exports/zip":{"get":{"tags":["Facturación CFDI 4.0 y Bóveda"],"summary":"Export Zip","operationId":"export_zip_api_v1_invoices_exports_zip_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"stamped","title":"Status"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/exports/excel":{"get":{"tags":["Facturación CFDI 4.0 y Bóveda"],"summary":"Export Excel","operationId":"export_excel_api_v1_invoices_exports_excel_get","parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/exports/csv":{"get":{"tags":["Facturación CFDI 4.0 y Bóveda"],"summary":"Export Csv","operationId":"export_csv_api_v1_invoices_exports_csv_get","parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/{invoice_id}":{"get":{"tags":["Facturación CFDI 4.0 y Bóveda"],"summary":"Get Invoice","operationId":"get_invoice_api_v1_invoices__invoice_id__get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/{invoice_id}/stamp":{"post":{"tags":["Facturación CFDI 4.0 y Bóveda"],"summary":"Stamp Existing Invoice","operationId":"stamp_existing_invoice_api_v1_invoices__invoice_id__stamp_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"send_email","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Send Email"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/{invoice_id}/cancel":{"post":{"tags":["Facturación CFDI 4.0 y Bóveda"],"summary":"Cancel Existing Invoice","operationId":"cancel_existing_invoice_api_v1_invoices__invoice_id__cancel_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelInvoiceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/{invoice_id}/status":{"post":{"tags":["Facturación CFDI 4.0 y Bóveda"],"summary":"Query Invoice Sat Status","operationId":"query_invoice_sat_status_api_v1_invoices__invoice_id__status_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/{invoice_id}/email":{"post":{"tags":["Facturación CFDI 4.0 y Bóveda"],"summary":"Email Invoice","operationId":"email_invoice_api_v1_invoices__invoice_id__email_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/{invoice_id}/xml":{"get":{"tags":["Facturación CFDI 4.0 y Bóveda"],"summary":"Download Xml","operationId":"download_xml_api_v1_invoices__invoice_id__xml_get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/{invoice_id}/pdf":{"get":{"tags":["Facturación CFDI 4.0 y Bóveda"],"summary":"Download Pdf","operationId":"download_pdf_api_v1_invoices__invoice_id__pdf_get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/{invoice_id}/cancel-acuse":{"get":{"tags":["Facturación CFDI 4.0 y Bóveda"],"summary":"Download Cancel Acuse","operationId":"download_cancel_acuse_api_v1_invoices__invoice_id__cancel_acuse_get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automation/orders":{"get":{"tags":["Automatización, API Keys y Webhooks"],"summary":"List Billing Orders","operationId":"list_billing_orders_api_v1_automation_orders_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BillingOrderOut"},"title":"Response List Billing Orders Api V1 Automation Orders Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Automatización, API Keys y Webhooks"],"summary":"Create Billing Order","description":"Crea una orden de cobro desde el dashboard o desde la app/módulo de finanzas del cliente.\n\n- Si `payment_confirmed=true` y `auto_issue=true`, emite y timbra el CFDI/REP al instante.\n- Si `payment_confirmed=false` (o `auto_issue=false`), queda en bandeja `awaiting_confirmation`\n  para que un operador humano confirme el pago con un clic y dispare el timbrado.","operationId":"create_billing_order_api_v1_automation_orders_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingOrderCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingOrderOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automation/orders/{order_id}/confirm":{"post":{"tags":["Automatización, API Keys y Webhooks"],"summary":"Confirm Billing Order","description":"Confirmación manual por operador (o vía API de finanzas) que dispara el timbrado CFDI/REP.","operationId":"confirm_billing_order_api_v1_automation_orders__order_id__confirm_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingOrderConfirmRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingOrderOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automation/orders/{order_id}/cancel":{"post":{"tags":["Automatización, API Keys y Webhooks"],"summary":"Cancel Billing Order","operationId":"cancel_billing_order_api_v1_automation_orders__order_id__cancel_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingOrderOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automation/webhooks/inbound/{tenant_id}/{source}":{"post":{"tags":["Automatización, API Keys y Webhooks"],"summary":"Receive Inbound Payment Webhook","description":"Endpoint receptor para eventos de pago de Stripe, Mercado Pago, Conekta, Openpay\no el módulo de finanzas propio del cliente.\n\nValida la firma HMAC-SHA256 del tenant y dispara automáticamente la emisión del CFDI\no deja la orden lista para confirmación manual según la configuración `auto_issue`.","operationId":"receive_inbound_payment_webhook_api_v1_automation_webhooks_inbound__tenant_id___source__post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"source","in":"path","required":true,"schema":{"type":"string","title":"Source"}},{"name":"X-FacturaMX-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Facturamx-Signature"}},{"name":"Stripe-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}},{"name":"X-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automation/inbound-config":{"get":{"tags":["Automatización, API Keys y Webhooks"],"summary":"Get Inbound Webhook Config","operationId":"get_inbound_webhook_config_api_v1_automation_inbound_config_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automation/inbound-config/rotate-secret":{"post":{"tags":["Automatización, API Keys y Webhooks"],"summary":"Rotate Inbound Webhook Secret","operationId":"rotate_inbound_webhook_secret_api_v1_automation_inbound_config_rotate_secret_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automation/api-keys":{"get":{"tags":["Automatización, API Keys y Webhooks"],"summary":"List Api Keys","operationId":"list_api_keys_api_v1_automation_api_keys_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyOut"},"title":"Response List Api Keys Api V1 Automation Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Automatización, API Keys y Webhooks"],"summary":"Create Api Key","operationId":"create_api_key_api_v1_automation_api_keys_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreatedOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automation/api-keys/{key_id}":{"delete":{"tags":["Automatización, API Keys y Webhooks"],"summary":"Revoke Api Key","operationId":"revoke_api_key_api_v1_automation_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automation/webhooks/outbound":{"get":{"tags":["Automatización, API Keys y Webhooks"],"summary":"List Outbound Webhooks","operationId":"list_outbound_webhooks_api_v1_automation_webhooks_outbound_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OutboundWebhookOut"},"title":"Response List Outbound Webhooks Api V1 Automation Webhooks Outbound Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Automatización, API Keys y Webhooks"],"summary":"Create Outbound Webhook","operationId":"create_outbound_webhook_api_v1_automation_webhooks_outbound_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundWebhookCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundWebhookCreatedOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automation/webhooks/outbound/{webhook_id}":{"delete":{"tags":["Automatización, API Keys y Webhooks"],"summary":"Delete Outbound Webhook","operationId":"delete_outbound_webhook_api_v1_automation_webhooks_outbound__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automation/webhooks/outbound/deliveries":{"get":{"tags":["Automatización, API Keys y Webhooks"],"summary":"List Webhook Deliveries","operationId":"list_webhook_deliveries_api_v1_automation_webhooks_outbound_deliveries_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryOut"},"title":"Response List Webhook Deliveries Api V1 Automation Webhooks Outbound Deliveries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automation/webhooks/outbound/test":{"post":{"tags":["Automatización, API Keys y Webhooks"],"summary":"Trigger Test Outbound Webhook","operationId":"trigger_test_outbound_webhook_api_v1_automation_webhooks_outbound_test_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market/public-catalog":{"get":{"tags":["Market Instalable y Pagos Stripe"],"summary":"Get Public Market Catalog","description":"Catálogo público del ecosistema Ccurity Market (sin precios privados ni datos de RFC).","operationId":"get_public_market_catalog_api_v1_market_public_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/market/catalog":{"get":{"tags":["Market Instalable y Pagos Stripe"],"summary":"Get Market Catalog","operationId":"get_market_catalog_api_v1_market_catalog_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market/apps/{slug}/install":{"post":{"tags":["Market Instalable y Pagos Stripe"],"summary":"Install Market App","operationId":"install_market_app_api_v1_market_apps__slug__install_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketInstallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market/apps/{slug}/toggle":{"post":{"tags":["Market Instalable y Pagos Stripe"],"summary":"Toggle Market App","operationId":"toggle_market_app_api_v1_market_apps__slug__toggle_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketToggleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market/apps/{slug}/config":{"patch":{"tags":["Market Instalable y Pagos Stripe"],"summary":"Update Market App Config","operationId":"update_market_app_config_api_v1_market_apps__slug__config_patch","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketConfigUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market/timbres/checkout":{"post":{"tags":["Market Instalable y Pagos Stripe"],"summary":"Checkout Timbre Package","operationId":"checkout_timbre_package_api_v1_market_timbres_checkout_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimbreCheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market/billing-portal":{"post":{"tags":["Market Instalable y Pagos Stripe"],"summary":"Open Stripe Billing Portal","operationId":"open_stripe_billing_portal_api_v1_market_billing_portal_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market/orders":{"get":{"tags":["Market Instalable y Pagos Stripe"],"summary":"List Tenant Market Orders","operationId":"list_tenant_market_orders_api_v1_market_orders_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Tenant-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market/webhooks/stripe":{"post":{"tags":["Market Instalable y Pagos Stripe"],"summary":"Stripe Platform Webhook","description":"Recibe eventos firmados de Stripe para acreditar timbres y activar/renovar apps del Market.","operationId":"stripe_platform_webhook_api_v1_market_webhooks_stripe_post","parameters":[{"name":"Stripe-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market/master/overview":{"get":{"tags":["Market Instalable y Pagos Stripe"],"summary":"Master Market Overview","operationId":"master_market_overview_api_v1_market_master_overview_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market/master/apps/{slug}":{"patch":{"tags":["Market Instalable y Pagos Stripe"],"summary":"Master Update Market App","operationId":"master_update_market_app_api_v1_market_master_apps__slug__patch","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MasterMarketAppUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market/master/timbre-packages/{slug}":{"patch":{"tags":["Market Instalable y Pagos Stripe"],"summary":"Master Update Timbre Package","operationId":"master_update_timbre_package_api_v1_market_master_timbre_packages__slug__patch","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MasterTimbrePackageUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market/master/tenants/{tenant_id}/apps/{slug}":{"post":{"tags":["Market Instalable y Pagos Stripe"],"summary":"Master Set Tenant App Access","description":"Permite a la cuenta maestra Ccurity otorgar cortesía, pausar o revocar un módulo por RFC.","operationId":"master_set_tenant_app_access_api_v1_market_master_tenants__tenant_id__apps__slug__post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MasterTenantAppAccessRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/contact":{"post":{"tags":["Landing y Contacto Público"],"summary":"Submit Contact Lead","description":"Recibe solicitudes de integración desde la landing page y las envía a Ccurity vía Resend.","operationId":"submit_contact_lead_api_v1_public_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicContactRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["Sistema"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ApiKeyCreateRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":2,"title":"Name"},"environment":{"type":"string","enum":["test","live"],"title":"Environment","default":"test"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"}},"type":"object","required":["name"],"title":"ApiKeyCreateRequest"},"ApiKeyCreatedOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"environment":{"type":"string","title":"Environment"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"plain_key":{"type":"string","title":"Plain Key"}},"type":"object","required":["id","name","key_prefix","environment","scopes","last_used_at","revoked_at","created_at","plain_key"],"title":"ApiKeyCreatedOut"},"ApiKeyOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"environment":{"type":"string","title":"Environment"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","key_prefix","environment","scopes","last_used_at","revoked_at","created_at"],"title":"ApiKeyOut"},"AuthResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"user":{"$ref":"#/components/schemas/UserOut"},"tenants":{"items":{"$ref":"#/components/schemas/TenantSummary"},"type":"array","title":"Tenants"}},"type":"object","required":["access_token","refresh_token","user","tenants"],"title":"AuthResponse"},"BillingOrderConfirmRequest":{"properties":{"forma_pago":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forma Pago"},"payment_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Reference"},"send_email":{"type":"boolean","title":"Send Email","default":true}},"type":"object","title":"BillingOrderConfirmRequest"},"BillingOrderCreateRequest":{"properties":{"external_reference":{"type":"string","maxLength":128,"minLength":1,"title":"External Reference"},"source":{"type":"string","enum":["manual","api","stripe","mercadopago","conekta","openpay","finance_module"],"title":"Source","default":"api"},"payment_mode":{"type":"string","enum":["issue_invoice","issue_rep"],"title":"Payment Mode","default":"issue_invoice"},"auto_issue":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Issue"},"payment_confirmed":{"type":"boolean","title":"Payment Confirmed","default":false},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"target_invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Invoice Id"},"currency":{"type":"string","title":"Currency","default":"MXN"},"amount_total":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string"}],"title":"Amount Total"},"forma_pago":{"type":"string","title":"Forma Pago","default":"03"},"uso_cfdi":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uso Cfdi"},"payment_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Reference"},"customer_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Customer Email"},"description":{"type":"string","title":"Description","default":"Cobro por servicios"},"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/InvoiceItemInput"},"type":"array"},{"type":"null"}],"title":"Items"},"receptor":{"anyOf":[{"$ref":"#/components/schemas/ReceptorInlineInput"},{"type":"null"}]}},"type":"object","required":["external_reference","amount_total"],"title":"BillingOrderCreateRequest"},"BillingOrderOut":{"properties":{"id":{"type":"string","title":"Id"},"external_reference":{"type":"string","title":"External Reference"},"source":{"type":"string","title":"Source"},"payment_mode":{"type":"string","title":"Payment Mode"},"auto_issue":{"type":"boolean","title":"Auto Issue"},"status":{"type":"string","title":"Status"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"target_invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Invoice Id"},"resulting_invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resulting Invoice Id"},"currency":{"type":"string","title":"Currency"},"amount_total":{"type":"string","title":"Amount Total"},"forma_pago":{"type":"string","title":"Forma Pago"},"uso_cfdi":{"type":"string","title":"Uso Cfdi"},"payment_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Reference"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"receptor_payload_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Receptor Payload Json"},"payment_confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Payment Confirmed At"},"confirmed_by_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmed By Type"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","external_reference","source","payment_mode","auto_issue","status","client_id","target_invoice_id","resulting_invoice_id","currency","amount_total","forma_pago","uso_cfdi","payment_reference","customer_email","receptor_payload_json","payment_confirmed_at","confirmed_by_type","error_message","created_at"],"title":"BillingOrderOut"},"Body_upload_csd_api_v1_csd_upload_post":{"properties":{"cer_file":{"type":"string","contentMediaType":"application/octet-stream","title":"Cer File"},"key_file":{"type":"string","contentMediaType":"application/octet-stream","title":"Key File"},"password":{"type":"string","title":"Password"}},"type":"object","required":["cer_file","key_file","password"],"title":"Body_upload_csd_api_v1_csd_upload_post"},"CancelInvoiceRequest":{"properties":{"motivo":{"type":"string","enum":["01","02","03","04"],"title":"Motivo"},"folio_sustitucion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folio Sustitucion"}},"type":"object","required":["motivo"],"title":"CancelInvoiceRequest"},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","maxLength":128,"minLength":1,"title":"Current Password"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"ClientCreate":{"properties":{"external_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference"},"rfc":{"type":"string","maxLength":13,"minLength":12,"title":"Rfc"},"razon_social":{"type":"string","maxLength":254,"minLength":2,"title":"Razon Social"},"domicilio_fiscal_cp":{"type":"string","maxLength":5,"minLength":5,"title":"Domicilio Fiscal Cp"},"regimen_fiscal":{"type":"string","maxLength":5,"minLength":3,"title":"Regimen Fiscal"},"uso_cfdi_default":{"type":"string","maxLength":5,"minLength":3,"title":"Uso Cfdi Default","default":"G03"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"extra_emails":{"items":{"type":"string","format":"email"},"type":"array","title":"Extra Emails"},"residencia_fiscal":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Residencia Fiscal"},"num_reg_id_trib":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Num Reg Id Trib"}},"type":"object","required":["rfc","razon_social","domicilio_fiscal_cp","regimen_fiscal"],"title":"ClientCreate"},"ClientOut":{"properties":{"id":{"type":"string","title":"Id"},"external_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference"},"rfc":{"type":"string","title":"Rfc"},"razon_social":{"type":"string","title":"Razon Social"},"domicilio_fiscal_cp":{"type":"string","title":"Domicilio Fiscal Cp"},"regimen_fiscal":{"type":"string","title":"Regimen Fiscal"},"uso_cfdi_default":{"type":"string","title":"Uso Cfdi Default"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"extra_emails":{"items":{"type":"string"},"type":"array","title":"Extra Emails"},"residencia_fiscal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Residencia Fiscal"},"num_reg_id_trib":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Num Reg Id Trib"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","external_reference","rfc","razon_social","domicilio_fiscal_cp","regimen_fiscal","uso_cfdi_default","email","extra_emails","residencia_fiscal","num_reg_id_trib","created_at"],"title":"ClientOut"},"ClientUpdate":{"properties":{"external_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference"},"rfc":{"anyOf":[{"type":"string","maxLength":13,"minLength":12},{"type":"null"}],"title":"Rfc"},"razon_social":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Razon Social"},"domicilio_fiscal_cp":{"anyOf":[{"type":"string","maxLength":5,"minLength":5},{"type":"null"}],"title":"Domicilio Fiscal Cp"},"regimen_fiscal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regimen Fiscal"},"uso_cfdi_default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uso Cfdi Default"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"extra_emails":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array"},{"type":"null"}],"title":"Extra Emails"},"residencia_fiscal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Residencia Fiscal"},"num_reg_id_trib":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Num Reg Id Trib"}},"type":"object","title":"ClientUpdate"},"CsdOut":{"properties":{"id":{"type":"string","title":"Id"},"rfc":{"type":"string","title":"Rfc"},"no_certificado":{"type":"string","title":"No Certificado"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"valid_from":{"type":"string","format":"date-time","title":"Valid From"},"valid_to":{"type":"string","format":"date-time","title":"Valid To"},"days_remaining":{"type":"integer","title":"Days Remaining","default":0},"is_test":{"type":"boolean","title":"Is Test"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","rfc","no_certificado","legal_name","valid_from","valid_to","is_test","is_active","created_at"],"title":"CsdOut"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InformacionGlobalInput":{"properties":{"periodicidad":{"type":"string","enum":["01","02","03","04","05"],"title":"Periodicidad"},"meses":{"type":"string","title":"Meses"},"anio":{"type":"integer","maximum":2099.0,"minimum":2022.0,"title":"Anio"}},"type":"object","required":["periodicidad","meses","anio"],"title":"InformacionGlobalInput"},"InvoiceCreateRequest":{"properties":{"tipo_comprobante":{"type":"string","enum":["I","E"],"title":"Tipo Comprobante","default":"I"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"receptor":{"anyOf":[{"$ref":"#/components/schemas/ReceptorInlineInput"},{"type":"null"}]},"moneda":{"type":"string","maxLength":3,"minLength":3,"title":"Moneda","default":"MXN"},"tipo_cambio":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Tipo Cambio"},"forma_pago":{"type":"string","maxLength":2,"minLength":2,"title":"Forma Pago","default":"03"},"metodo_pago":{"type":"string","enum":["PUE","PPD"],"title":"Metodo Pago","default":"PUE"},"uso_cfdi":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uso Cfdi"},"exportacion":{"type":"string","title":"Exportacion","default":"01"},"condiciones_pago":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condiciones Pago"},"serie":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serie"},"informacion_global":{"anyOf":[{"$ref":"#/components/schemas/InformacionGlobalInput"},{"type":"null"}]},"relations":{"items":{"$ref":"#/components/schemas/InvoiceRelationInput"},"type":"array","title":"Relations"},"items":{"items":{"$ref":"#/components/schemas/InvoiceItemInput"},"type":"array","minItems":1,"title":"Items"},"external_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference"},"stamp_immediately":{"type":"boolean","title":"Stamp Immediately","default":false},"send_email":{"type":"boolean","title":"Send Email","default":false}},"type":"object","required":["items"],"title":"InvoiceCreateRequest"},"InvoiceItemInput":{"properties":{"product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id"},"clave_prod_serv":{"type":"string","maxLength":8,"minLength":6,"title":"Clave Prod Serv","default":"81112500"},"no_identificacion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"No Identificacion"},"cantidad":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string"}],"title":"Cantidad"},"clave_unidad":{"type":"string","maxLength":5,"minLength":2,"title":"Clave Unidad","default":"E48"},"unidad":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unidad","default":"Servicio"},"descripcion":{"type":"string","maxLength":1000,"minLength":1,"title":"Descripcion"},"valor_unitario":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string"}],"title":"Valor Unitario"},"descuento":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"}],"title":"Descuento","default":"0"},"objeto_imp":{"type":"string","enum":["01","02","03","04"],"title":"Objeto Imp","default":"02"},"iva_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"}],"title":"Iva Rate","default":"0.160000"},"iva_exempt":{"type":"boolean","title":"Iva Exempt","default":false},"ieps_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Ieps Rate"},"isr_retention_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Isr Retention Rate"},"iva_retention_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Iva Retention Rate"},"taxes":{"anyOf":[{"items":{"$ref":"#/components/schemas/TaxInput"},"type":"array"},{"type":"null"}],"title":"Taxes"}},"type":"object","required":["cantidad","descripcion","valor_unitario"],"title":"InvoiceItemInput"},"InvoiceItemOut":{"properties":{"id":{"type":"string","title":"Id"},"clave_prod_serv":{"type":"string","title":"Clave Prod Serv"},"no_identificacion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"No Identificacion"},"cantidad":{"type":"string","title":"Cantidad"},"clave_unidad":{"type":"string","title":"Clave Unidad"},"unidad":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unidad"},"descripcion":{"type":"string","title":"Descripcion"},"valor_unitario":{"type":"string","title":"Valor Unitario"},"importe":{"type":"string","title":"Importe"},"descuento":{"type":"string","title":"Descuento"},"objeto_imp":{"type":"string","title":"Objeto Imp"},"taxes":{"items":{"$ref":"#/components/schemas/InvoiceTaxOut"},"type":"array","title":"Taxes"}},"type":"object","required":["id","clave_prod_serv","no_identificacion","cantidad","clave_unidad","unidad","descripcion","valor_unitario","importe","descuento","objeto_imp"],"title":"InvoiceItemOut"},"InvoiceOut":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"tipo_comprobante":{"type":"string","title":"Tipo Comprobante"},"serie":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serie"},"folio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folio"},"uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uuid"},"external_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference"},"fecha_emision":{"type":"string","format":"date-time","title":"Fecha Emision"},"fecha_timbrado":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fecha Timbrado"},"lugar_expedicion":{"type":"string","title":"Lugar Expedicion"},"moneda":{"type":"string","title":"Moneda"},"forma_pago":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forma Pago"},"metodo_pago":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metodo Pago"},"uso_cfdi":{"type":"string","title":"Uso Cfdi"},"exportacion":{"type":"string","title":"Exportacion"},"emisor_snapshot_json":{"additionalProperties":true,"type":"object","title":"Emisor Snapshot Json"},"receptor_snapshot_json":{"additionalProperties":true,"type":"object","title":"Receptor Snapshot Json"},"subtotal":{"type":"string","title":"Subtotal"},"descuento":{"type":"string","title":"Descuento"},"total_impuestos_trasladados":{"type":"string","title":"Total Impuestos Trasladados"},"total_impuestos_retenidos":{"type":"string","title":"Total Impuestos Retenidos"},"total":{"type":"string","title":"Total"},"amount_paid":{"type":"string","title":"Amount Paid"},"amount_due":{"type":"string","title":"Amount Due"},"parcialidades_count":{"type":"integer","title":"Parcialidades Count"},"no_certificado_emisor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"No Certificado Emisor"},"no_certificado_sat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"No Certificado Sat"},"rfc_prov_certif":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rfc Prov Certif"},"pac_provider_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pac Provider Used"},"sat_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sat Status"},"sat_cancellable_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sat Cancellable Status"},"cancel_motivo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Motivo"},"cancel_folio_sustitucion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Folio Sustitucion"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"items":{"items":{"$ref":"#/components/schemas/InvoiceItemOut"},"type":"array","title":"Items"},"relations":{"items":{"$ref":"#/components/schemas/InvoiceRelationOut"},"type":"array","title":"Relations"}},"type":"object","required":["id","status","tipo_comprobante","serie","folio","uuid","external_reference","fecha_emision","fecha_timbrado","lugar_expedicion","moneda","forma_pago","metodo_pago","uso_cfdi","exportacion","emisor_snapshot_json","receptor_snapshot_json","subtotal","descuento","total_impuestos_trasladados","total_impuestos_retenidos","total","amount_paid","amount_due","parcialidades_count","no_certificado_emisor","no_certificado_sat","rfc_prov_certif","pac_provider_used","sat_status","sat_cancellable_status","cancel_motivo","cancel_folio_sustitucion","cancelled_at","error_message","created_at"],"title":"InvoiceOut"},"InvoiceRelationInput":{"properties":{"tipo_relacion":{"type":"string","maxLength":2,"minLength":2,"title":"Tipo Relacion"},"related_uuid":{"type":"string","maxLength":36,"minLength":36,"title":"Related Uuid"}},"type":"object","required":["tipo_relacion","related_uuid"],"title":"InvoiceRelationInput"},"InvoiceRelationOut":{"properties":{"tipo_relacion":{"type":"string","title":"Tipo Relacion"},"related_uuid":{"type":"string","title":"Related Uuid"}},"type":"object","required":["tipo_relacion","related_uuid"],"title":"InvoiceRelationOut"},"InvoiceTaxOut":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"impuesto":{"type":"string","title":"Impuesto"},"tipo_factor":{"type":"string","title":"Tipo Factor"},"tasa_o_cuota":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tasa O Cuota"},"base":{"type":"string","title":"Base"},"importe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Importe"}},"type":"object","required":["id","kind","impuesto","tipo_factor","tasa_o_cuota","base","importe"],"title":"InvoiceTaxOut"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"MarketConfigUpdateRequest":{"properties":{"config_json":{"additionalProperties":true,"type":"object","title":"Config Json"}},"type":"object","title":"MarketConfigUpdateRequest"},"MarketInstallRequest":{"properties":{"billing_interval":{"type":"string","enum":["monthly","yearly"],"title":"Billing Interval","default":"monthly"}},"type":"object","title":"MarketInstallRequest"},"MarketToggleRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"MarketToggleRequest"},"MasterAllocateTimbresRequest":{"properties":{"tenant_id":{"type":"string","maxLength":64,"minLength":1,"title":"Tenant Id"},"amount":{"type":"integer","maximum":1000000.0,"minimum":-100000.0,"title":"Amount"},"notes":{"type":"string","maxLength":300,"title":"Notes","default":"Asignación de timbres por intermediario maestro C-CURITY PROVEEDORES DE SEGURIDAD PRIVADA S.A. DE C.V."}},"type":"object","required":["tenant_id","amount"],"title":"MasterAllocateTimbresRequest"},"MasterMarketAppUpdateRequest":{"properties":{"billing_type":{"anyOf":[{"type":"string","enum":["free","subscription","external","coming_soon"]},{"type":"null"}],"title":"Billing Type"},"price_monthly_mxn":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Price Monthly Mxn"},"price_yearly_mxn":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Price Yearly Mxn"},"stripe_price_id_monthly":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Price Id Monthly"},"stripe_price_id_yearly":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Price Id Yearly"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"MasterMarketAppUpdateRequest"},"MasterTenantAppAccessRequest":{"properties":{"status":{"type":"string","enum":["active","disabled","revoked"],"title":"Status","default":"active"},"notes":{"type":"string","maxLength":240,"title":"Notes","default":"Acceso gestionado desde Panel Maestro Ccurity"}},"type":"object","title":"MasterTenantAppAccessRequest"},"MasterTimbrePackageUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":2},{"type":"null"}],"title":"Name"},"timbres_count":{"anyOf":[{"type":"integer","maximum":1000000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Timbres Count"},"price_mxn":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string"},{"type":"null"}],"title":"Price Mxn"},"stripe_price_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Price Id"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"MasterTimbrePackageUpdateRequest"},"MasterUpdateUserProfileRequest":{"properties":{"account_type":{"type":"string","enum":["client","accountant","master"],"title":"Account Type"}},"type":"object","required":["account_type"],"title":"MasterUpdateUserProfileRequest"},"OutboundWebhookCreateRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":2,"title":"Name"},"url":{"type":"string","maxLength":512,"minLength":8,"title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"}},"type":"object","required":["name","url"],"title":"OutboundWebhookCreateRequest"},"OutboundWebhookCreatedOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["id","name","url","events","is_active","created_at","secret"],"title":"OutboundWebhookCreatedOut"},"OutboundWebhookOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","url","events","is_active","created_at"],"title":"OutboundWebhookOut"},"ProductCreate":{"properties":{"sku":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sku"},"descripcion":{"type":"string","maxLength":1000,"minLength":1,"title":"Descripcion"},"clave_prod_serv":{"type":"string","maxLength":8,"minLength":6,"title":"Clave Prod Serv","default":"81112500"},"clave_unidad":{"type":"string","maxLength":5,"minLength":2,"title":"Clave Unidad","default":"E48"},"unidad":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Unidad","default":"Servicio"},"valor_unitario":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string"}],"title":"Valor Unitario"},"objeto_imp":{"type":"string","enum":["01","02","03","04"],"title":"Objeto Imp","default":"02"},"iva_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"}],"title":"Iva Rate","default":"0.160000"},"iva_exempt":{"type":"boolean","title":"Iva Exempt","default":false},"ieps_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Ieps Rate"},"isr_retention_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Isr Retention Rate"},"iva_retention_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Iva Retention Rate"}},"type":"object","required":["descripcion","valor_unitario"],"title":"ProductCreate"},"ProductOut":{"properties":{"id":{"type":"string","title":"Id"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"descripcion":{"type":"string","title":"Descripcion"},"clave_prod_serv":{"type":"string","title":"Clave Prod Serv"},"clave_unidad":{"type":"string","title":"Clave Unidad"},"unidad":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unidad"},"valor_unitario":{"type":"string","title":"Valor Unitario"},"objeto_imp":{"type":"string","title":"Objeto Imp"},"iva_rate":{"type":"string","title":"Iva Rate"},"iva_exempt":{"type":"boolean","title":"Iva Exempt"},"ieps_rate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ieps Rate"},"isr_retention_rate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Isr Retention Rate"},"iva_retention_rate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iva Retention Rate"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","sku","descripcion","clave_prod_serv","clave_unidad","unidad","valor_unitario","objeto_imp","iva_rate","iva_exempt","ieps_rate","isr_retention_rate","iva_retention_rate","created_at"],"title":"ProductOut"},"ProductUpdate":{"properties":{"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"descripcion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Descripcion"},"clave_prod_serv":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clave Prod Serv"},"clave_unidad":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clave Unidad"},"unidad":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unidad"},"valor_unitario":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string"},{"type":"null"}],"title":"Valor Unitario"},"objeto_imp":{"anyOf":[{"type":"string","enum":["01","02","03","04"]},{"type":"null"}],"title":"Objeto Imp"},"iva_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Iva Rate"},"iva_exempt":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Iva Exempt"},"ieps_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Ieps Rate"},"isr_retention_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Isr Retention Rate"},"iva_retention_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Iva Retention Rate"}},"type":"object","title":"ProductUpdate"},"PublicContactRequest":{"properties":{"name":{"type":"string","maxLength":160,"minLength":2,"title":"Name"},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"},"profile_interest":{"type":"string","enum":["cliente","contador","api_integracion","otro"],"title":"Profile Interest","default":"api_integracion"},"message":{"type":"string","maxLength":2000,"minLength":4,"title":"Message"}},"type":"object","required":["name","email","message"],"title":"PublicContactRequest"},"ReceptorInlineInput":{"properties":{"rfc":{"type":"string","maxLength":13,"minLength":12,"title":"Rfc"},"razon_social":{"type":"string","maxLength":254,"minLength":1,"title":"Razon Social"},"domicilio_fiscal_cp":{"type":"string","maxLength":5,"minLength":5,"title":"Domicilio Fiscal Cp"},"regimen_fiscal":{"type":"string","maxLength":5,"minLength":3,"title":"Regimen Fiscal"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"residencia_fiscal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Residencia Fiscal"},"num_reg_id_trib":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Num Reg Id Trib"}},"type":"object","required":["rfc","razon_social","domicilio_fiscal_cp","regimen_fiscal"],"title":"ReceptorInlineInput"},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshRequest"},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"full_name":{"type":"string","maxLength":200,"minLength":2,"title":"Full Name"},"account_type":{"type":"string","enum":["client","accountant"],"title":"Account Type","default":"client"},"company_name":{"type":"string","maxLength":200,"minLength":2,"title":"Company Name"},"rfc":{"type":"string","maxLength":13,"minLength":12,"title":"Rfc"},"razon_social":{"type":"string","maxLength":254,"minLength":2,"title":"Razon Social"},"regimen_fiscal":{"type":"string","maxLength":5,"minLength":3,"title":"Regimen Fiscal","default":"601"},"codigo_postal":{"type":"string","maxLength":5,"minLength":5,"title":"Codigo Postal","default":"06600"},"accept_privacy_and_terms":{"type":"boolean","title":"Accept Privacy And Terms","default":true}},"type":"object","required":["email","password","full_name","company_name","rfc","razon_social"],"title":"RegisterRequest"},"RepCreateRequest":{"properties":{"target_invoice_id":{"type":"string","title":"Target Invoice Id"},"monto":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string"}],"title":"Monto"},"forma_de_pago_p":{"type":"string","maxLength":2,"minLength":2,"title":"Forma De Pago P","default":"03"},"fecha_pago":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fecha Pago"},"moneda_p":{"type":"string","maxLength":3,"minLength":3,"title":"Moneda P","default":"MXN"},"num_operacion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Num Operacion"},"external_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference"},"send_email":{"type":"boolean","title":"Send Email","default":false}},"type":"object","required":["target_invoice_id","monto"],"title":"RepCreateRequest"},"SendEmailRequest":{"properties":{"emails":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array"},{"type":"null"}],"title":"Emails"}},"type":"object","title":"SendEmailRequest"},"TaxInput":{"properties":{"kind":{"type":"string","enum":["traslado","retencion"],"title":"Kind"},"impuesto":{"type":"string","enum":["001","002","003"],"title":"Impuesto"},"tipo_factor":{"type":"string","enum":["Tasa","Cuota","Exento"],"title":"Tipo Factor","default":"Tasa"},"tasa_o_cuota":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Tasa O Cuota"}},"type":"object","required":["kind","impuesto"],"title":"TaxInput"},"TeamMemberInviteRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"full_name":{"type":"string","maxLength":200,"minLength":2,"title":"Full Name"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"role":{"type":"string","enum":["owner","admin","accountant","issuer","viewer"],"title":"Role","default":"issuer"}},"type":"object","required":["email","full_name","password"],"title":"TeamMemberInviteRequest"},"TenantCreateRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":2,"title":"Name"},"rfc":{"type":"string","maxLength":13,"minLength":12,"title":"Rfc"},"razon_social":{"type":"string","maxLength":254,"minLength":2,"title":"Razon Social"},"regimen_fiscal":{"type":"string","maxLength":5,"minLength":3,"title":"Regimen Fiscal","default":"601"},"codigo_postal":{"type":"string","maxLength":5,"minLength":5,"title":"Codigo Postal","default":"06600"},"email_contacto":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email Contacto"}},"type":"object","required":["name","rfc","razon_social"],"title":"TenantCreateRequest"},"TenantDetailOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"rfc":{"type":"string","title":"Rfc"},"razon_social":{"type":"string","title":"Razon Social"},"regimen_fiscal":{"type":"string","title":"Regimen Fiscal"},"codigo_postal":{"type":"string","title":"Codigo Postal"},"email_contacto":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Contacto"},"logo_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Base64"},"serie_ingreso":{"type":"string","title":"Serie Ingreso"},"next_folio_ingreso":{"type":"integer","title":"Next Folio Ingreso"},"serie_egreso":{"type":"string","title":"Serie Egreso"},"next_folio_egreso":{"type":"integer","title":"Next Folio Egreso"},"serie_pago":{"type":"string","title":"Serie Pago"},"next_folio_pago":{"type":"integer","title":"Next Folio Pago"},"pac_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pac Provider"},"plan_tier":{"type":"string","title":"Plan Tier"},"default_auto_issue":{"type":"boolean","title":"Default Auto Issue"},"timbre_balance":{"type":"integer","title":"Timbre Balance","default":0}},"type":"object","required":["id","name","rfc","razon_social","regimen_fiscal","codigo_postal","email_contacto","logo_base64","serie_ingreso","next_folio_ingreso","serie_egreso","next_folio_egreso","serie_pago","next_folio_pago","pac_provider","plan_tier","default_auto_issue"],"title":"TenantDetailOut"},"TenantSummary":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"rfc":{"type":"string","title":"Rfc"},"razon_social":{"type":"string","title":"Razon Social"},"regimen_fiscal":{"type":"string","title":"Regimen Fiscal"},"codigo_postal":{"type":"string","title":"Codigo Postal"},"role":{"type":"string","title":"Role","default":"owner"},"plan_tier":{"type":"string","title":"Plan Tier","default":"starter"},"default_auto_issue":{"type":"boolean","title":"Default Auto Issue","default":true}},"type":"object","required":["id","name","rfc","razon_social","regimen_fiscal","codigo_postal"],"title":"TenantSummary"},"TenantUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"rfc":{"anyOf":[{"type":"string","maxLength":13,"minLength":12},{"type":"null"}],"title":"Rfc"},"razon_social":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Razon Social"},"regimen_fiscal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regimen Fiscal"},"codigo_postal":{"anyOf":[{"type":"string","maxLength":5,"minLength":5},{"type":"null"}],"title":"Codigo Postal"},"email_contacto":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email Contacto"},"logo_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Base64"},"serie_ingreso":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serie Ingreso"},"next_folio_ingreso":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Next Folio Ingreso"},"serie_egreso":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serie Egreso"},"next_folio_egreso":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Next Folio Egreso"},"serie_pago":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serie Pago"},"next_folio_pago":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Next Folio Pago"},"pac_provider":{"anyOf":[{"type":"string","enum":["mock","sw_sapien","finkok",""]},{"type":"null"}],"title":"Pac Provider"},"default_auto_issue":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Default Auto Issue"}},"type":"object","title":"TenantUpdateRequest"},"TimbreCheckoutRequest":{"properties":{"package_slug":{"type":"string","maxLength":64,"minLength":2,"title":"Package Slug"}},"type":"object","required":["package_slug"],"title":"TimbreCheckoutRequest"},"TimbreTopupRequest":{"properties":{"amount":{"type":"integer","maximum":100000.0,"minimum":1.0,"title":"Amount"},"notes":{"type":"string","title":"Notes","default":"Recarga de timbres"}},"type":"object","required":["amount"],"title":"TimbreTopupRequest"},"UserOut":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"account_type":{"type":"string","title":"Account Type","default":"client"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","full_name","created_at"],"title":"UserOut"},"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"},"WebhookDeliveryOut":{"properties":{"id":{"type":"string","title":"Id"},"webhook_id":{"type":"string","title":"Webhook Id"},"event_type":{"type":"string","title":"Event Type"},"response_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Status"},"response_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Body"},"attempts":{"type":"integer","title":"Attempts"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","webhook_id","event_type","response_status","response_body","attempts","status","created_at"],"title":"WebhookDeliveryOut"}}}}