V2 Alpha — This endpoint is part of the V2 API preview. Breaking changes may occur.
Overview
Retrieve a paginated report of line-item-level sales data for a specific vendor. Includes order details, pricing, commission, deductions, and payout amounts. Vendor tokens can only access their own reports.
Use Cases
- Vendor sales reports — Display detailed earnings breakdowns
- Commission auditing — Verify commission calculations per line item
- Export to accounting — Pull structured data for bookkeeping
Path Parameters
The vendor’s MongoDB ObjectId.
Query Parameters
Filter by start date (ISO 8601).
Filter by end date (ISO 8601).
Number of items to return, forward pagination (1–100).
Cursor for forward pagination.
Number of items to return, backward pagination (1–100).
Cursor for backward pagination.
Response
{
"success": true,
"data": {
"items": [
{
"_id": "507f1f77bcf86cd799439025",
"orderNumber": 1042,
"orderName": "#1042",
"orderDate": "2024-06-15T10:30:00.000Z",
"lineItemName": "Widget Pro - Large / Blue",
"lineItemSku": "WP-LG-BL",
"quantity": 2,
"unitPrice": 139.99,
"netSales": 279.99,
"commission": 39.20,
"deduction": 0,
"payout": 240.79,
"paid": 0,
"balance": 240.79,
"status": "unpaid"
}
],
"pageInfo": {
"hasNextPage": true,
"hasPreviousPage": false,
"startCursor": "eyJpZCI6IjUwN2YxZjc3YmNmODZjZDc5OTQzOTAyNSJ9",
"endCursor": "eyJpZCI6IjUwN2YxZjc3YmNmODZjZDc5OTQzOTAzNSJ9",
"totalCount": 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?dateStart=2024-01-01T00:00:00Z&first=50" \
-H "x-access-token: YOUR_JWT_TOKEN"