Chargeback API
The chargeback endpoints let you automate cost attribution: define how shared spend is split, and pull the resulting report for finance. All calls require thex-optscale-token header (see Authentication).
Allocation rules
Allocation rules describe how a shared cost is divided across target pools. KOSTRA supports three split methods —equal, weighted, and proportional.
List allocation rules
Create an allocation rule
Get, update, or delete a rule
Chargeback report
start_date and end_date are Unix timestamps.
This is the endpoint to pull a monthly chargeback into a finance system or an internal billing process.
Export pool expenses
A monthly chargeback integration
- Ensure your allocation rules reflect the current cost-sharing policy (create or
PATCHas needed). GET .../chargeback_reportfor the closed month.- Post the per-pool totals to your finance system, or export to a spreadsheet for review.