Usage snapshot (default) or billed-spend metering (with params)
usage_get_usageUsage snapshot (default) or billed-spend metering (with params)
Args:
reconcile: Snapshot mode only. For Stripe subscription users, `true` forces a
subscription reconciliation pass even when cached plan data looks
complete.
range: Window to report. cycle / prev-cycle resolve to the customer's
real billing-period bounds (falling back to a trailing 30 days when
no invoice exists yet); 7d…12mo are trailing windows; custom
uses from / to.
from_: Inclusive start (UTC date). Required when range=custom.
to: Inclusive end (UTC date). Required when range=custom. Max span 366 days.
granularity: Bucketing of the days series: day (one row per UTC day),
month (one row per calendar month, dated to the 1st), or total
(no series — read totals). Does not affect totals.
group_by: Metering mode. Adds attribution: the window's spend split per profile or per account (keys are ids; resolve names via GET /v1/profiles / GET /v1/accounts).
profile_id: Metering mode (pair with range). Project the payload onto this profile's attributed share. Mutually exclusive with accountId, and groupBy (if given) must be profile; 404 when the profile is not in your workspace (or outside a scoped key's profiles).
account_id: Metering mode (pair with range). Project the payload onto this account's attributed share. Mutually exclusive with profileId, and groupBy (if given) must be account; 404 when the account is not visible to the caller.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ||
| from_ | No | ||
| range | No | cycle | |
| group_by | No | ||
| reconcile | No | ||
| account_id | No | ||
| profile_id | No | ||
| granularity | No | day |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |