Skip to content

Sales Trend

Gap-filled time series of revenue and order count. Bucketed by day for ranges up to 90 days, by week for longer windows.

GET /v1/dashboard/sales/trend

Query Parameters

Same filters as Sales Summary: from, to, product_id, status, search. Without from/to the window defaults to the last 30 days.

Response

json
{
  "data": {
    "data": [
      { "date": "2026-06-10", "revenue": 240.00, "orders": 3 },
      { "date": "2026-06-11", "revenue": 0, "orders": 0 },
      { "date": "2026-06-12", "revenue": 99.00, "orders": 1 }
    ],
    "bucket": "day"
  }
}
FieldDescription
bucketday (≤90-day range) or week.
dataContinuous series — buckets with no sales are filled with zeros.

Example

bash
curl -X GET "https://api.packedge.dev/v1/dashboard/sales/trend?from=2026-01-01&to=2026-06-12" \
  -H "Authorization: Bearer pk_your_api_key"