Skip to main content
GET
/
v2
/
reports
/
{vendorId}
Get Vendor Report
curl --request GET \
  --url https://api.puppetvendors.com/v2/reports/{vendorId} \
  --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 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

vendorId
string
required
The vendor’s MongoDB ObjectId.

Query Parameters

dateStart
string
Filter by start date (ISO 8601).
dateEnd
string
Filter by end date (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": "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

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