soeru Analytics API
The Analytics API from soeru — 14 operation(s) for analytics.
The Analytics API from soeru — 14 operation(s) for analytics.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/soeru-biz:soeru-biz-analytics-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: soeru Analytics API
description: AIパーソナライズ明細書メッセージ自動生成SaaS
version: 0.1.0
tags:
- name: Analytics
paths:
/api/analytics/dashboard:
get:
tags:
- Analytics
summary: Get Dashboard Data
description: 'Get dashboard summary data.
Performance optimizations:
- 5-min in-memory cache, invalidated on message generation
- asyncio.to_thread() for all sync Supabase calls → true parallelism
- Consolidated per-shop monthly counts into single in_() query
- Reduced total queries from ~15+ sequential to ~8 parallel'
operationId: get_dashboard_data_api_analytics_dashboard_get
parameters:
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/analytics:
get:
tags:
- Analytics
summary: Get Analytics
description: 'Get full analytics data for the analytics page.
Perf note (2026-04-23): the five queries below (monthly counts ×2 +
30-day paginated aggregations ×3 over message_history) used to run
serially on the request thread. They are now executed in parallel
via ``asyncio.gather`` + ``asyncio.to_thread`` — each inner function
still owns its own try/except so a single sub-query failure degrades
to safe defaults without taking the whole endpoint down. Wall-clock
improves roughly ``Σ latencies → max latency`` for this endpoint,
which is the dominant cost for ``/dashboard/insights``.'
operationId: get_analytics_api_analytics_get
parameters:
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/analytics/growth:
get:
tags:
- Analytics
summary: Get Growth
description: Get soeru Growth Index — 5-dimension learning visualization data.
operationId: get_growth_api_analytics_growth_get
parameters:
- name: weeks
in: query
required: false
schema:
type: integer
maximum: 52
minimum: 1
description: Number of weeks of history
default: 12
title: Weeks
description: Number of weeks of history
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/analytics/customer-stories:
get:
tags:
- Analytics
summary: Get Customer Stories
description: Get detailed customer stories for the shop.
operationId: get_customer_stories_api_analytics_customer_stories_get
parameters:
- name: limit
in: query
required: false
schema:
type: integer
description: Max stories to return
default: 20
title: Limit
description: Max stories to return
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/analytics/analyze-arcs:
post:
tags:
- Analytics
summary: Trigger Arc Analysis
description: 'Trigger arc analysis for the shop''s customers.
Analyzes customers with 2+ orders who haven''t been analyzed recently.'
operationId: trigger_arc_analysis_api_analytics_analyze_arcs_post
parameters:
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/analytics/usage:
get:
tags:
- Analytics
summary: Get Usage Stats
description: Get usage statistics for the shop.
operationId: get_usage_stats_api_analytics_usage_get
parameters:
- name: period
in: query
required: false
schema:
type: string
description: day, week, month
default: month
title: Period
description: day, week, month
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/analytics/engagement:
get:
tags:
- Analytics
summary: Get Engagement
description: 'Get engagement summary with period-over-period comparison.
Returns metrics for the last 30 days vs the previous 30 days,
including message volume, repeat rate, feedback, and link scans.'
operationId: get_engagement_api_analytics_engagement_get
parameters:
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/analytics/engagement/trend:
get:
tags:
- Analytics
summary: Get Engagement Trend
description: Get weekly engagement trend data for charting.
operationId: get_engagement_trend_api_analytics_engagement_trend_get
parameters:
- name: weeks
in: query
required: false
schema:
type: integer
maximum: 52
minimum: 4
default: 12
title: Weeks
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/analytics/engagement/refresh:
post:
tags:
- Analytics
summary: Refresh Engagement Snapshots
description: Rebuild weekly engagement snapshots (admin action).
operationId: refresh_engagement_snapshots_api_analytics_engagement_refresh_post
parameters:
- name: weeks
in: query
required: false
schema:
type: integer
maximum: 52
minimum: 4
default: 12
title: Weeks
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/analytics/dashboard/link-stats:
get:
tags:
- Analytics
summary: Get Dashboard Link Stats
description: Lightweight link stats for dashboard card (total_codes, total_scans, scan_rate + QR feedback).
operationId: get_dashboard_link_stats_api_analytics_dashboard_link_stats_get
parameters:
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/analytics/link:
get:
tags:
- Analytics
summary: Get Link Analytics Summary
description: Get つなぐQR scan/click funnel summary.
operationId: get_link_analytics_summary_api_analytics_link_get
parameters:
- name: days
in: query
required: false
schema:
type: integer
maximum: 90
minimum: 7
default: 30
title: Days
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/analytics/link/trend:
get:
tags:
- Analytics
summary: Get Link Trend
description: Get weekly つなぐQR scan/click trend data.
operationId: get_link_trend_api_analytics_link_trend_get
parameters:
- name: weeks
in: query
required: false
schema:
type: integer
maximum: 52
minimum: 4
default: 12
title: Weeks
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/analytics/daily-breakdown:
get:
tags:
- Analytics
summary: Get Daily Breakdown
description: 'Get daily message counts for a given month across all shops.
Returns per-day counts for the requested month, used by the
dashboard''s accordion daily breakdown. Only fetched on demand
(lazy-loaded) for better performance.'
operationId: get_daily_breakdown_api_analytics_daily_breakdown_get
parameters:
- name: year
in: query
required: true
schema:
type: integer
maximum: 2030
minimum: 2024
title: Year
- name: month
in: query
required: true
schema:
type: integer
maximum: 12
minimum: 1
title: Month
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/analytics/dashboard/feature-summary:
get:
tags:
- Analytics
summary: Get Feature Summary
description: 'FeatureMenu 9 カード分の実数値メトリクスを 1 shot で返却.
各 metric は best-effort (table 不在や query 失敗時は 0 / None で続行).
Failure は warning ログのみ、レスポンスは 200 で返す (UI 側は欠落 metric
があれば fallback 表示する).'
operationId: get_feature_summary_api_analytics_dashboard_feature_summary_get
parameters:
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer <token>
title: Authorization
description: Bearer <token>
- name: x-shop-id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Optional shop ID
title: X-Shop-Id
description: Optional shop ID
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
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
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError