Skip to main content
BlueAI
Home/CRM/Reports

Reports

Retrieve sales reports including pipeline forecasts, revenue projections, and stage distribution.

|

Endpoints

GET/api/v1/crm/reports/pipeline-summaryGet pipeline summary
GET/api/v1/crm/reports/forecastGet revenue forecast
GET/api/v1/crm/reports/owner-performanceGet performance by owner
GET/api/v1/crm/reports/pipeline-summary

Get pipeline summary

Returns deal count and total amount distribution by stage. Used to get an overview of the sales pipeline.

Authentication requiredInclude session cookie or Bearer token

Query Parameters

NameTypeRequiredDescription
pipeline_id
stringOptionalFilter by pipeline ID

Response Fields

NameTypeRequiredDescription
PipelineSummaryRow[]OptionalArray 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/forecast

Get revenue forecast

Returns monthly revenue forecast based on expected close dates. Aggregates deal count and forecast amount by month within the specified period.

Authentication requiredInclude session cookie or Bearer token

Query Parameters

NameTypeRequiredDescription
from
stringOptionalStart month (YYYY-MM, required)
to
stringOptionalEnd month (YYYY-MM, required)

Response Fields

NameTypeRequiredDescription
ForecastRow[]OptionalArray 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-performance

Get performance by owner

Returns deal count, won count, win rate, and revenue by owner. Used for team performance analysis.

Authentication requiredInclude session cookie or Bearer token

Response Fields

NameTypeRequiredDescription
OwnerPerformanceRow[]OptionalArray 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
    }
  ]
}