Median

GET /analytics/satisfaction

Updated Oct 1, 20261 minute read

Satisfaction

The stars customers left, day by day: sums and counts rather than averages, so you can average whole weeks yourself.

Part of Analytics.

Parameters

NameInTypeRequiredDescription
fromqueryintegerNoThe window's start, unix ms. Defaults to days ago.
daysquery7 | 30 | 90NoDaily buckets after from. Default 30.

Responses

StatusDescription
200The window, bucketed by day.
400The request is malformed, and the message names the field.
401The bearer token is missing, revoked, or expired.
429Too many requests. Wait the seconds in Retry-After. Limits depend on the plan. See rate limits.

200 body

FieldTypeRequiredDescription
perDaySuminteger[]No
perDayCountinteger[]No
averageanyNo
countintegerNo
distributioninteger[]NoHow many left one star, two, and so on. Five entries.
cappedbooleanNoThe range held more than 2,000 ratings, so the newest 2,000 were counted.

Example request

curl https://api.median.sh/v1/analytics/satisfaction \
  -H "Authorization: Bearer $BEARER_AUTH"

Still need help?

    Esc