Skip to content

Admin Costs

List Cogs Rates

Current plan + this month’s consumption for each flat-rate provider.

Responses

StatusDescriptionBody
200Successful ResponseCogsRateResponse[]
422Validation ErrorHTTPValidationError

Update Cogs Rate

Set a provider’s plan, then re-price the affected rollups.

effective_from defaults to the start of the current month so the change covers the month being billed. Anything already rolled up from that date forward is recomputed, since the hourly cron would only ever revisit its own trailing window.

Parameters

NameInTypeRequiredDescription
metricpathstringyes

Request body (required)

FieldTypeRequiredDescription
billing_modestringno
effective_fromstring (date)no
included_unitsintegerno
monthly_fee_usdnumber | stringno
overage_unit_usdnumber | stringno
planstringyes

Responses

StatusDescriptionBody
200Successful ResponseCogsRateResponse
422Validation ErrorHTTPValidationError