V2 Alpha — This endpoint is part of the V2 API preview. Breaking changes may occur.
Overview
Get aggregated totals for a vendor including total quantity, net sales, commission, deductions, payout, and paid/unpaid amounts. Vendor tokens can only access their own reports.
Use Cases
- Dashboard summary cards — Show key metrics at a glance
- Period reporting — Get totals for a specific date range
- Payout overviews — Quick view of outstanding balances
Path Parameters
The vendor’s MongoDB ObjectId.
Query Parameters
Filter by start date (ISO 8601).
Filter by end date (ISO 8601).
Response
{
"success": true,
"data": {
"totalQuantity": 1250,
"totalNetSales": 45890.50,
"totalCommission": 6424.67,
"totalDeduction": 0,
"totalPayout": 39465.83,
"totalPaid": 32000.00,
"totalBalance": 7465.83,
"itemCount": 320
}
}
Error Response
{
"success": false,
"error": {
"message": "Vendor tokens can only access their own reports",
"code": "FORBIDDEN"
}
}
Example
curl -X GET "https://api.puppetvendors.com/v2/reports/507f1f77bcf86cd799439011/summary?dateStart=2024-01-01T00:00:00Z&dateEnd=2024-12-31T23:59:59Z" \
-H "x-access-token: YOUR_JWT_TOKEN"