Organization

Query billing transactions

Queries the billing transaction history for this organization — each posted charge, payment, credit, refund, and adjustment on the organization's account balance.

Transactions are returned most recent first by default (unlike most query methods, sort_dir defaults to desc).

Amounts are in the organization's billing currency, with charges negative and payments/credits positive. Each transaction also includes the organization's account balance immediately after the transaction was posted.

Usage-based charges (such as per-message fees and overage charges) accumulate throughout the day and are posted to the transaction history approximately once per day, so the most recent usage may not yet appear as posted transactions. Pass include_pending=true to also retrieve the current pending (not yet posted) usage charges in a separate pending_transactions property of the response (available via the REST API; the pending items have no new_balance since they are not yet posted).

get/v1/organizations/{organization_id}/billing_transactions

Request

  • Base URL: https://api.telerivet.com
  • URL: https://api.telerivet.com/v1/organizations/{organization_id}/billing_transactions
  • 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

time_postedinteger

Unix timestamp in seconds

Filter transactions by the time they were posted

entry_typestring

Filter transactions by type, e.g. card_payment, service_plan_debit, or message_processing_fee_debit. Multiple types may be provided as a comma-separated string.

usage_categorystring

Filter usage transactions by pricing category, e.g. sms_outgoing

usage_countrystring

Filter usage transactions by 2-letter country code

usage_networkstring

Filter usage transactions by mobile network code

project_idstring

ID of Project

Filter transactions associated with a particular project

phone_idstring

ID of Phone

Filter transactions associated with a particular basic route (phone)

include_pendingboolean

If true, the response includes a pending_transactions property with usage charges that have accrued but have not yet been posted to the transaction history

sort_dir'asc' | 'desc'

Sort the results in ascending or descending order of time posted

page_sizeinteger

Number of results returned per page (max 500)

offsetinteger

Number of items to skip from beginning of result set

markerstring

'next_marker' property returned by a previous call to this API method, indicating where the next page of results should start.

countboolean

If true, the API will return the count of items matching the filter, instead of the items themselves

Response

Successful response. When count=1 parameter is provided, returns {"count": N} instead.

dataobject[]

Array of results (omitted when count=1)

truncatedboolean

True if there are more results

next_markerstring

Marker for pagination

page_sizeinteger

Number of results per page

sort_dir'asc' | 'desc'

Sort direction

countinteger

Total count of matching items (only when count=1 parameter is provided)

Changes

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