Skip to main content
GET
/
v2
/
vendor
/
dashboard
/
products
/
top
Get Top Products
curl --request GET \
  --url https://api.puppetvendors.com/v2/vendor/dashboard/products/top \
  --header 'x-access-token: <api-key>'
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

dateStart
string
Filter by date (minimum, ISO 8601).
dateEnd
string
Filter by date (maximum, ISO 8601).
first
integer
Number of items to return, forward pagination (1-100).
after
string
Cursor for forward pagination.
last
integer
Number of items to return, backward pagination (1-100).
before
string
Cursor for backward pagination.

Response

200
{
  "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"