Skip to main content
GET
/
reports
/
quantity-distribution
Get quantity distribution analysis
curl --request GET \
  --url https://api.sprucecollective.co.uk/reports/quantity-distribution \
  --header 'Authorization: <api-key>'
{
  "box_plot": {
    "max": 123,
    "median": 123,
    "min": 123,
    "q1": 123,
    "q3": 123
  },
  "buckets": [
    {
      "count": 123,
      "cumulative_percent": 123,
      "label": "<string>",
      "max": 123,
      "min": 123,
      "revenue_cents": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Type "Bearer" followed by a space and JWT token.

Query Parameters

days
integer

Number of days to analyze (default: 30)

start
string

Start date (YYYY-MM-DD)

end
string

End date (YYYY-MM-DD)

site_id
string

Site ID for multi-tenant filtering

Response

200 - application/json

OK

box_plot
object
buckets
object[]