Organization

Get billing transaction totals

Retrieves aggregate totals of the organization's billing transactions over a date range, optionally grouped by transaction properties and/or rolled up into calendar periods.

This is useful for answering questions such as how much was spent on each type of usage in a given month, without needing to retrieve each individual transaction via queryBillingTransactions.

Amounts are in the organization's billing currency, with charges negative and payments/credits positive. Totals are always separated by currency; entries in different currencies are never summed together.

Note that usage-based charges are posted to the transaction history approximately once per day, so totals for a range including the current day may not include the most recent usage.

get/v1/organizations/{organization_id}/billing_transaction_totals

Request

  • Base URL: https://api.telerivet.com
  • URL: https://api.telerivet.com/v1/organizations/{organization_id}/billing_transaction_totals
  • Auth: one of:
    • HTTP basic
    • OAuth 2 (authorization code, authorization URL https://telerivet.com/oauth/authorize, token URL https://api.telerivet.com/oauth/token)

Path parameters

organization_idstring required

ID of the Organization

Query parameters

start_datestring required

Start date of transactions to include, in YYYY-MM-DD format (in the organization's time zone)

end_datestring required

End date of transactions to include (inclusive), in YYYY-MM-DD format (in the organization's time zone)

rollup'day' | 'week' | 'month' | 'year'

If provided, totals are computed separately for each calendar period within the date range (in the organization's time zone), and each item in totals includes a period_start property. If not provided, totals cover the entire date range.

group_bystring

Comma-separated list of up to 2 transaction properties to group totals by: entry_type, project_id, phone_id, usage_category, usage_country, and/or usage_network. Grouped property values are included in each item in totals. Pass an empty string to compute overall totals without grouping.

entry_typestring

Only include transactions of particular types, e.g. card_payment or service_plan_debit. Multiple types may be provided as a comma-separated string.

usage_categorystring

Only include usage transactions with a particular pricing category

usage_countrystring

Only include usage transactions with a particular 2-letter country code

usage_networkstring

Only include usage transactions with a particular mobile network code

project_idstring

ID of Project

Only include transactions associated with a particular project

phone_idstring

ID of Phone

Only include transactions associated with a particular basic route (phone)

Response

Successful response

timezone_idstring

The organization's time zone ID, used to determine period boundaries

truncatedboolean

True if the number of result items exceeded the maximum (500) and the results were truncated

Changes

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