Reports
Retrieve sales reports including pipeline forecasts, revenue projections, and stage distribution.
|
Endpoints
| GET | /api/v1/crm/reports/pipeline-summary | Get pipeline summary |
| GET | /api/v1/crm/reports/forecast | Get revenue forecast |
| GET | /api/v1/crm/reports/owner-performance | Get performance by owner |
GET
/api/v1/crm/reports/pipeline-summaryGet pipeline summary
Returns deal count and total amount distribution by stage. Used to get an overview of the sales pipeline.
Authentication required— Include session cookie or Bearer token
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
pipeline_id | string | Optional | Filter by pipeline ID |
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
| PipelineSummaryRow[] | Optional | Array of per-stage summary rows |
Code Examples
curl "https://api.blueai.jp/api/v1/crm/reports/pipeline-summary" \
-H "Cookie: better-auth.session_token=<token>"Response Example
{
"data": [
{
"stage": "lead",
"deal_count": 15,
"total_amount": 4500000
},
{
"stage": "qualification",
"deal_count": 8,
"total_amount": 3200000
},
{
"stage": "proposal",
"deal_count": 5,
"total_amount": 6000000
},
{
"stage": "negotiation",
"deal_count": 3,
"total_amount": 4800000
},
{
"stage": "closed_won",
"deal_count": 10,
"total_amount": 12000000
},
{
"stage": "closed_lost",
"deal_count": 4,
"total_amount": 1600000
}
]
}GET
/api/v1/crm/reports/forecastGet revenue forecast
Returns monthly revenue forecast based on expected close dates. Aggregates deal count and forecast amount by month within the specified period.
Authentication required— Include session cookie or Bearer token
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
from | string | Optional | Start month (YYYY-MM, required) |
to | string | Optional | End month (YYYY-MM, required) |
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
| ForecastRow[] | Optional | Array of monthly forecast rows |
Code Examples
curl "https://api.blueai.jp/api/v1/crm/reports/forecast" \
-H "Cookie: better-auth.session_token=<token>"Response Example
{
"data": [
{
"month": "2026-01",
"deal_count": 3,
"total_amount": 3600000
},
{
"month": "2026-02",
"deal_count": 5,
"total_amount": 5800000
},
{
"month": "2026-03",
"deal_count": 7,
"total_amount": 8400000
}
]
}GET
/api/v1/crm/reports/owner-performanceGet performance by owner
Returns deal count, won count, win rate, and revenue by owner. Used for team performance analysis.
Authentication required— Include session cookie or Bearer token
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
| OwnerPerformanceRow[] | Optional | Array of per-owner performance rows |
Code Examples
curl "https://api.blueai.jp/api/v1/crm/reports/owner-performance" \
-H "Cookie: better-auth.session_token=<token>"Response Example
{
"data": [
{
"assigned_member_id": "usr_99999999999999999999999999999999",
"assigned_member_name": "山田太郎",
"deal_count": 12,
"won_count": 5,
"total_amount": 9600000,
"won_amount": 6000000
},
{
"assigned_member_id": "usr_88888888888888888888888888888888",
"assigned_member_name": "佐藤花子",
"deal_count": 8,
"won_count": 3,
"total_amount": 7200000,
"won_amount": 4500000
},
{
"assigned_member_id": null,
"assigned_member_name": null,
"deal_count": 3,
"won_count": 0,
"total_amount": 900000,
"won_amount": 0
}
]
}