Skip to content

Statistics

Statistics endpoints provide analytics on leads, orders, agents, products, and stock movement. All statistics support date-range and filter parameters.

Lead Statistics

GET/statistics/leads🔒 Session

View lead conversion statistics. Supports filters by team, product, account, and agent.

Powered by LeadStatisticService. Permission checks determine which filters are available.

Cancel Lead Statistics

GET/statistics/cancel-leads🔒 Session

View statistics for canceled leads.

Order Statistics

GET/statistics/orders🔒 Session

View order statistics dashboard.

GET/statistics/orders/get🔒 Session

Retrieve order statistics data (JSON). Uses OrderStatisticService.

GET/statistics/orders/fees🔒 Session

Retrieve order fees breakdown (JSON).

Agent Statistics

GET/statistics/agents🔒 Session

Per-agent performance metrics. Admin only.

Aggregates per-agent data:

  • Lead history stats (confirmed, wrong, call_later, no_answer, etc.)
  • Order conversion stats
  • Cached for 3 minutes

Results are scoped by UserHierarchyQueryService based on the admin's team hierarchy.

Agent Call Statistics

GET/statistics/agents-calls🔒 Session

View agent call activity and timing statistics. Admin only.

Product Statistics

GET/statistics/products🔒 Session

Per-product analytics including lead count, order count, shipped, delivered, and returned quantities.

Scoped by HierarchyQueryService. Filterable by date range and other parameters.

Product Stock Statistics

GET/statistics/products-stock🔒 Session

Product stock movement analysis — shipped, delivered, and returned quantities per product.

Filterable by shipping company.

Dashboard Profit Statistics

GET/profit-statistics🔒 Session

Profit overview for the dashboard home page.

GET/board-profit-statistics🔒 Session

Board-level profit statistics for the dashboard.

WedoCOD Documentation