School - Statistics
An external school's statistics about its own competence
Lessons of the caller's competence: completed hours, deleted, modified and booked
The admin lessons report narrowed to the caller's school (lesson_order.competence_school_id). competence_school may be omitted or repeat the caller's own id; anything else, and group_by=competence_school, is a 400.
Money of the caller's competence: revenue and the competence quota
Only two measures, by design: revenue_total (what families paid for the lessons of the collected orders of the caller's competence, on the order's created_at clock, as in the admin finance report) and external_school_quota_total (the competence quota the school is entitled to on those lessons). FPC's costs, fees and margin are not available here.
Families and teachers of the caller's competence
Families (new, active, churn) are counted under the school their billing city resolves to today. Active teachers are counted under the school of the lessons that made them active, so a teacher who also taught for other schools is counted by each of them. Registered teachers are not available: a teacher has no competence school of their own.
Product mix of the caller's competence: orders, hours, money and price per hour of each single-lesson length and each training
The admin product mix report (api/admin/statistics/products/mix/search). Narrowed by the order's competence school (lesson_order.competence_school_id); competence_school is forced to the caller, may be omitted or repeat the caller's own id, and anything else is a 400.
Transition matrix of the caller's competence: how families' purchases moved between single lessons and trainings across a pivot date or a tariff change
The admin transition matrix (api/admin/statistics/products/transitions/search). Narrowed by the order's competence school (lesson_order.competence_school_id); competence_school is forced to the caller, may be omitted or repeat the caller's own id, and anything else is a 400. A family is profiled on the purchases made from the caller only. Accepts pivot_date or price_change_id, window_days and compare_previous_year; a pivot not before today is a 400.
Conversion cohorts of the caller's competence: families whose first purchase was a single lesson, and the share that bought a training within 30, 60 and 90 days
The admin conversion report (api/admin/statistics/products/conversion/search). Narrowed by the order's competence school (lesson_order.competence_school_id); competence_school is forced to the caller, may be omitted or repeat the caller's own id, and anything else is a 400. The first purchase is the first one made from the caller. Accepts start_date_time, end_date_time and sort_order (of the cohorts).