V2 Alpha — This endpoint is part of the V2 API preview. Breaking changes may occur.
Overview
Retrieve a paginated list of top performing products for the authenticated vendor, ranked by quantity sold. Each item includes the product name, variant, SKU, and total revenue generated.
Vendor Token Required — This endpoint requires a vendor-scoped JWT token. Merchant tokens will receive a 403 error.
Use Cases
- Identify best sellers on a vendor analytics dashboard
- Monitor product performance over a specific date range
Query Parameters
Filter by date (minimum, ISO 8601).
Filter by date (maximum, 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": "507f1f77bcf86cd799439011",
"productName": "Premium Cotton T-Shirt",
"variant": "Large / Black",
"sku": "PCT-LG-BLK",
"productId": 8123456789,
"variantId": 4512345678,
"quantitySold": 142,
"totalRevenue": 4260.00
},
{
"_id": "507f1f77bcf86cd799439012",
"productName": "Premium Cotton T-Shirt",
"variant": "Medium / White",
"sku": "PCT-MD-WHT",
"productId": 8123456789,
"variantId": 4512345679,
"quantitySold": 98,
"totalRevenue": 2940.00
}
],
"paginationMeta": {
"hasNextPage": true,
"hasPreviousPage": false,
"startCursor": "eyJpZCI6IjUwN2YxZjc3YmNmODZjZDc5OTQzOTAxMSJ9",
"endCursor": "eyJpZCI6IjUwN2YxZjc3YmNmODZjZDc5OTQzOTAxMiJ9"
}
}
}
Example
curl -X GET "https://api.puppetvendors.com/v2/vendor/dashboard/products/top?dateStart=2024-01-01T00:00:00Z&dateEnd=2024-06-30T23:59:59Z&first=10" \
-H "x-access-token: YOUR_VENDOR_JWT_TOKEN"