Lotia Твой личный ИИ-ассистент
OpenAPI

Lotia API contract

Схема и onboarding-контракт для web, mobile и будущих реальных интеграций.

OpenAPI schema доступна как JSON и подходит для codegen, QA и клиентских SDK.

/api/schema/

Core endpoints

GET /api/overview/

Сводный payload для web/mobile, включая predictive ledger, voice runtime transport/background posture и mobile release contour

GET /api/subscription/

Freemium / Premium / Corporate summary: entitlements, paywall state, lifecycle state, provider subscription contour and upgrade options

GET /api/billing/summary/

Billing center summary: invoice orbit, active checkout session, webhook trail, lifecycle billing state, provider subscription state and renewal attention

GET /api/billing/reconciliation/

Billing provider health: checkout/runtime gaps, webhook failures, provider ref and reconciliation flags

GET /api/billing/provider-sync/

Provider sync summary: recent runs, drift flags, store-receipt parity, gateway configuration posture/missing env, replay-ready failed webhook, provider subscription state и runtime sync posture

GET /api/billing/incidents/

Billing incident ops summary: open/acknowledged/resolved incident trail, criticality counts and recent runtime issues

GET /api/marketplace/summary/

CPA attribution summary: route funnel, projected cashback, partner revenue and recent journeys

GET /api/marketplace/payouts/

Marketplace payout summary: unsettled conversions, receivable commission, cashback liability and recent settlement batches

GET /api/corporate-summary/

B2B tenant summary: corporate state, seat map coverage, next anchor and rollout attention

GET /api/corporate-reporting/

Aggregated corporate reporting: active/paused seats, privacy-safe wellbeing buckets and workspace breakdown

GET /api/corporate-insights/

Anonymized corporate insights: cohort-gated readiness/load buckets with workspace privacy threshold status

GET /api/corporate-compliance/

Corporate compliance summary: strict workspaces, export access policy, retention windows and audit readiness

GET /api/corporate-export-governance/

Export governance summary: audit trail, retention cleanup posture and workspace-level export controls

GET /api/corporate-export-requests/

Owner-review export queue: pending/reviewable corporate export requests with execution status

GET /api/data-insights/

Global anonymized data product summary: consent-aware cohort readiness, productivity peaks, readiness buckets and marketplace intent

GET /api/corporate-workspaces/

Corporate workspaces: linked team spaces, seat cards, wellbeing coverage and action cards

GET /api/family-spaces/

Shared family/team operating summary: roles, permissions, member load and suggested actions

GET /api/family-operating-plan/

Actionable family/team operating plan: shared anchors, quiet sprint, child-support и elder-care windows

GET /api/household-graph/

Caregiver/dependent household graph: child + elder hotspots, caregiver map and next support anchor

GET /api/voice-coach/

Voice coach briefing: recommended mode, privacy note, session memory, prompt library и walk-and-talk quick actions

GET /api/voice-runtime/

Voice runtime posture: permission state, bridge freshness/version, native manifest fields, runtime incidents, continuity status и actionable handoff/self-remediation controls

GET /api/voice-sessions/

Последние voice sessions Lumi с preview и active status

GET /api/voice-sessions/<uuid>/turns/

История turns внутри конкретной voice session

GET /api/voice-sessions/<uuid>/checkpoints/

Continuity trail для voice session: recent handoff и resume checkpoints

GET /api/recommendations/

Ranked recommendation cards, learning summary и trace history

GET /api/predictive-forecast/

Persisted predictive ledger summary: recent forecast runs, pressure state и capture readiness

GET /api/planner/

Снимок auto-balance, Energy First, adaptive recovery, energy horizon, burnout guard и predictive outlook с confidence/momentum/mitigation cadence

GET /api/family-scheduler/

Поиск общего семейного или командного окна

GET /api/privacy-center/

Privacy и consent settings c history audit trail

GET /api/auth-sessions/

Список authorization sessions с sanitized OAuth context

GET /api/connector-catalog/

Каталог доступных интеграций

GET /api/connector-health/

Connector ops summary: reauth, stale sync, webhook/runtime drift и recent integration incidents

GET /api/connections/

Подключения с sanitized provider config и credential health state

GET /api/activity-logs/

Последние auth/sync события и audit trail

GET /api/notifications/

Мягкие in-app nudges и их статусы

GET /api/devices/

Реестр устройств и push surfaces пользователя

GET /api/digests/

История daily digest очередей и доставки

GET /api/tasks/?category=family&page=1&page_size=5

Фильтрация и opt-in pagination

POST /api/webhooks/connectors/<provider>/

Ingestion provider webhooks и постановка delta sync в очередь

POST /api/tasks/

Создание фокус-задачи для quick planner web/mobile

POST /api/billing/checkout/

Старт checkout session для следующего или конкретного invoice; для store-managed contour вернуть external-management handoff, а для unconfigured hosted gateway — explicit setup-required payload

POST /api/billing/customer-portal/

Поднять customer portal session для renewal/autorenew/invoice self-serve flow; для store-managed contour вернуть external-management handoff, а для unconfigured gateway — setup-required payload

POST /api/billing/checkout-sessions/<uuid>/complete/

Sandbox/manual completion для checkout session с immediate billing resync

POST /api/billing/reconciliation/

Actionable billing recovery: provider resync, retry failed checkout или восстановление invoice runtime

POST /api/billing/provider-sync/

Provider sync action: refresh runtime metadata, import provider snapshot, sync App Store / Google Play receipt contour, replay failed webhook или прогнать billing maintenance contour; maintenance теперь может сам подтянуть due store receipt

POST /api/billing/incidents/<id>/action/

Ops action для billing incident: acknowledge, resolve, reopen или run_recommended для replay webhook, receipt sync, customer portal, checkout либо external-store handoff прямо из billing center

POST /api/billing/invoices/<id>/action/

Billing center action: mark invoice as paid, past due or void and resync subscription orbit

POST /api/subscription/lifecycle/

Schedule cancel, planned downgrade или restore renewal contour; для App Store / Google Play вернуть explicit external-management handoff

POST /api/webhooks/billing/<provider>/

Provider billing webhook: idempotent invoice/checkout event ingestion, subscription contour updates, Stripe signature or store-specific verification, and runtime update

POST /api/marketplace/interactions/

Фиксация marketplace touchpoint: view, click или conversion с обновленным attribution summary

POST /api/marketplace/payouts/

Marketplace finance action: preview settlement, собрать payout batch или отметить export/settlement в partner finance contour

POST /api/corporate-workspaces/ensure/

Поднять первый corporate workspace и связанный team space для B2B orbit

POST /api/corporate-workspaces/<id>/action/

Применить corporate action: sync members или quiet sprint для linked team space

POST /api/corporate-workspaces/<id>/invites/

Создать corporate invite для invite-only/domain-exception onboarding с domain-policy и role-governance checks

POST /api/corporate-workspaces/<id>/members/<membership-id>/action/

Управление corporate seat и role governance: pause/reactivate seat, promote admin, set manager или вернуть member

POST /api/corporate-invites/<uuid>/action/

Принять или отозвать corporate invite, повторно проверить текущую domain policy и обновить seat map / linked team membership

POST /api/corporate-export-governance/

Preview/log export scope или запустить retention cleanup для corporate governance trail

POST /api/corporate-compliance/

Compliance remediation: применить strict/export/retention guardrails к workspace, закрыть просроченные export requests, out-of-policy invites или pause out-of-policy active seats

POST /api/corporate-export-requests/<uuid>/action/

Owner/admin review action для export request: approve+execute, reject или cancel pending request

PATCH /api/corporate-workspaces/<id>/policy/

Обновить corporate policy: cohort threshold, compliance mode, export access, directory visibility, member access policy, domain allowlist, data region и retention windows

POST /api/events/

Создание manual event через быстрый планировщик

POST /api/events/apple-calendar/

Нативный ingest Apple Calendar snapshot из мобильного клиента

POST /api/energy/apple-health/

Нативный ingest Apple Health snapshot из мобильного клиента

POST /api/predictive-forecast/

Capture/apply/cleanup для predictive ledger: snapshot, monthly outlook apply и history cleanup

POST /api/planner/

Активация auto-balance, adaptive recovery, Energy First, energy horizon, burnout guard и predictive outlook сценариев

POST /api/voice-coach/

Короткий Lumi voice-style ответ с persistence в voice session

POST /api/voice-runtime/

Voice runtime action: refresh runtime, enable coach/background/auto-speak, request device settings handoff, sync bridge snapshot с native manifest, acknowledge warning, save handoff или поднять resume-ready checkpoint

POST /api/voice-sessions/

Открытие новой voice session c explicit thread reset

POST /api/voice-sessions/<uuid>/turns/

Новый turn в выбранной voice session

POST /api/voice-sessions/<uuid>/checkpoints/

Сохранить handoff/resume checkpoint для активной voice session

POST /api/voice-turns/<uuid>/confirm/

Безопасное подтверждение voice action через planner/family execution path

POST /api/family-scheduler/

Закрепление общего family/team слота в календаре

POST /api/family-operating-plan/

Применение family/team operating action: quiet sprint, shared reset, child-support или elder-care slot

POST /api/recommendations/feedback/

Acceptance/dismiss feedback; `execute=true` сразу запускает planner action для actionable trace

POST /api/connections/authorize/

Старт OAuth/native onboarding: live OAuth выдает authorization URL, native providers — explicit device handoff, а unconfigured providers — setup-required payload вместо silent stub

POST /api/connector-health/

Connector maintenance action: refresh incidents, expire stale auth sessions, expire stale sync runs, clear blocked webhook backlog, renew webhooks, drain backlog или прогнать full maintenance cycle

POST /api/connections/<id>/reauthorize/

Recovery flow для live OAuth connection с reuse pending auth session

POST /api/connections/<id>/trust-native-device/

Подтверждение нового Apple native device после suspicious handoff review

POST /api/auth-sessions/<uuid>/complete/

Ручное завершение authorization session через code

PATCH /api/privacy-center/

Обновление consent flags для AI/biometrics/marketplace/B2B

PATCH /api/events/<id>/

Отмена или возврат события без полной перезагрузки клиента

GET /api/sync-runs/?status=retrying

Диагностика повторных попыток синхронизации

GET /api/sync-runs/?triggered_by=webhook

Диагностика event-driven delta sync runs

POST /api/connections/onboard/

Подключение провайдера и первичный sync

POST /api/connections/<id>/sync/

Ручной запуск синхронизации; live `needs_reauth` connection вернет 409 с recovery action

POST /api/connector-incidents/<id>/action/

Ops action для connector incident: acknowledge/resolve/reopen или run_recommended для sync, reauthorize и trusted-device remediation

POST /api/auth/login/

Token auth для mobile

POST /api/devices/

Регистрация текущего mobile/web device для push-ready delivery

PATCH /api/subscription/

Немедленное переключение плана аккаунта и пересчет entitlement/paywall orbit