Credit economy: family credit granted, spent and returned, the discount it gave on paid orders and who absorbed it, the teacher credit ledger and the outstanding balances
POST/api/admin/statistics/credits/search
Three clocks, each stated on its measure: the ledger measures (family_credit_, teacher_credit_) count rows by the date they were written; the discount measures (paid_orders_with_credit, credit_discount_, credit_absorbed_, credit_awaiting_settlement) follow the orders created in the range, as finance revenue does. "Paid" means the order status is charged, partial_transfer or full_transfer: a pending checkout, an expired one (deleted) and a free order never count. Absorption is read off the lessons already settled (status transferred), as frozen by the payout run in lesson.credit_to_. balances are per-holder ledger sums as of end_date_time (now when omitted). totals covers the whole range, series the same measures per period. With competence_school, the family ledger and family balances follow the family's current competence school and the discount measures the order's own; the teacher ledger cannot be split (credit earned on lessons of several schools, spent on documents of several issuers), so teacher_credit_ and balances.teacher are null.
Request
Responses
- 200
- 400
- 401
- 403
- 500
Ok
Invalid parameters
Unauthorized
Forbidden
Internal server error