Reports API
Generate comprehensive business reports and analytics
20 endpoints
Base URL:
https://api.nexapay.com/v1| Method | Path | Description |
|---|---|---|
| GET | /reports/sales | Sales summary report |
| GET | /reports/sales/daily | Daily sales breakdown |
| GET | /reports/sales/hourly | Hourly sales analysis |
| GET | /reports/sales/by-store | Sales by store |
| GET | /reports/sales/by-staff | Sales by staff member |
| GET | /reports/products/top-selling | Top selling products |
| GET | /reports/products/slow-moving | Slow moving products |
| GET | /reports/products/categories | Sales by category |
| GET | /reports/products/margins | Product margin analysis |
| GET | /reports/customers/new | New customers report |
| GET | /reports/customers/retention | Customer retention analysis |
| GET | /reports/customers/lifetime-value | Customer lifetime value |
| GET | /reports/financial/revenue | Revenue report |
| GET | /reports/financial/expenses | Expense report |
| GET | /reports/financial/profit | Profit & loss statement |
| GET | /reports/inventory/valuation | Inventory valuation |
| GET | /reports/inventory/turnover | Inventory turnover |
| GET | /reports/staff/performance | Staff performance |
| GET | /reports/staff/hours | Staff hours worked |
| GET | /reports/export | Export reports as CSV/PDF |
Detailed Examples
GET
/reports/salesQuery Parameters
GET /reports/sales?start_date=2024-01-01&end_date=2024-01-31&store_id=store_abc123&group_by=day
Response
{
"success": true,
"data": {
"period": {
"start": "2024-01-01",
"end": "2024-01-31"
},
"summary": {
"total_sales": 45678.90,
"total_orders": 1234,
"average_order": 37.02,
"total_customers": 567,
"new_customers": 89,
"returning_rate": 84.3
},
"breakdown": [
{
"date": "2024-01-01",
"sales": 1523.45,
"orders": 42,
"customers": 38
},
{
"date": "2024-01-02",
"sales": 1678.90,
"orders": 47,
"customers": 41
}
],
"comparison": {
"previous_period": {
"sales": 42156.78,
"change_percent": 8.35
}
}
}
}