UserAnalytics API

for owner

GET /api/v1/users/:id/analytics/sales_summary

Parameters

Name Description
id id
kind author or affiliate

Request

Headers

Accept: application/json
X-Api-Token: tWvAVTkJ4SsRT1uL9mD276KxfXvV_YHjFw
X-Api-Email: user-736@example.com

Route

GET /api/v1/users/1097/analytics/sales_summary?kind=affiliate

Query Parameters

kind: affiliate

cURL

curl "http://localhost:3000/api/v1/users/1097/analytics/sales_summary?kind=affiliate" -X GET \
	-H "Accept: application/json" \
	-H "X-Api-Token: tWvAVTkJ4SsRT1uL9mD276KxfXvV_YHjFw" \
	-H "X-Api-Email: user-736@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 456

Status

200 OK

Body

{
  "revenue_day": 0,
  "earnings_day": 0,
  "sales_day": 0,
  "chargeback_rate_day": 0,
  "revenue_one_day_ago": 0,
  "earnings_one_day_ago": 0,
  "sales_one_day_ago": 0,
  "chargeback_rate_one_day_ago": 0,
  "revenue_30_days": 0,
  "earnings_30_days": 0,
  "sales_30_days": 0,
  "chargeback_rate_30_days": 0,
  "revenue_30_days_one_month_ago": 0,
  "earnings_30_days_one_month_ago": 0,
  "sales_30_days_one_month_ago": 0,
  "chargeback_rate_30_days_one_month_ago": 0,
  "teachable_fees_last_month": 0,
  "lifetime_revenue": 0
}