Usage

Get the usage breakdown

Returns what the workspace used and was charged over a period, in US cents at list price. Each call groups rows by one by value, day, platform or keyword, and always includes the totals. range reads the past UTC days up to today (30d by default). month reads one calendar month (YYYY-MM), which is what you match against a bill or a per-client margin. Keyword-days come from the daily run and mention charges from billed matches. So a deleted keyword keeps its charges in the keyword rows (keyword.removed), while its mention counts show 0. Each keyword carries the same numbers for the current month as stats.cost. totals.ledgerDebitCents is what the balance has been debited so far for the period's days. Mentions settle the morning after, so a period ending today is below totals.totalCents by the unsettled ones, and a finished month differs only by cumulative rounding. Rows come in pages (limit, offset, total). A workspace can call this 30 times a minute across all its keys and tokens.

get/v1/usage/breakdown

Request

  • Base URL: https://api.rumoro.dev
  • URL: https://api.rumoro.dev/v1/usage/breakdown
  • Auth: HTTP bearer

Query parameters

by'day' | 'platform' | 'keyword' | 'group'

How to group the rows. day gives one row per UTC day, then platform, keyword (the default, used to work out margins), or group (the cost of a client or campaign).

range'7d' | '30d' | '90d'

How many UTC days back from today to read. One of 7d, 30d or 90d, 30d by default. Ignored when you send month.

monthstring

A calendar month (YYYY-MM, UTC) to read instead of a range. It covers the month's first to last day, or up to today for the current month. A future month returns 400.

limitinteger

How many rows to return, from 1 to 500, 100 by default. Only by=keyword can need more than one page, since a period has at most 90 days and there are only a dozen platforms.

offsetinteger nullable

How many rows to skip.

Response

The period's totals and a page of rows

by'day' | 'platform' | 'keyword' | 'group' required

Grouping used for the rows.

currency'USD' required

All amounts are in US cents.

totalinteger required

The number of rows before limit and offset are applied.

Changes

No recorded changes to this operation across all 1 revision of this API.