Listing Billing Summaries

Get a list of Billing Summaries, reverse ordered by created date. Use parameters to filter the list.


GET https://utilityapi.com/api/v2/accounting/billing-summaries
# Get a list of all Billing Summaries
curl -H 'Authorization: Bearer API_TOKEN_HERE' \
    'https://utilityapi.com/api/v2/accounting/billing-summaries'
# Get some specific Billing Summaries 123 and 456
curl -H 'Authorization: Bearer API_TOKEN_HERE' \
    'https://utilityapi.com/api/v2/accounting/billing-summaries?uids=123,456'
# Get the Billing Summaries for a specific Authorization
curl -H 'Authorization: Bearer API_TOKEN_HERE' \
    'https://utilityapi.com/api/v2/accounting/billing-summaries?authorizations=1234'
# Get the Billing Summaries for a specific Billing Account
curl -H 'Authorization: Bearer API_TOKEN_HERE' \
    'https://utilityapi.com/api/v2/accounting/billing-summaries?billing_accounts=5678'
# Get the Billing Summaries for a specific Meter
curl -H 'Authorization: Bearer API_TOKEN_HERE' \
    'https://utilityapi.com/api/v2/accounting/billing-summaries?meters=122344'
Parameter Format Description Example
uids List(UID String) Filter by Billing Summary uids. Separate with commas (,). uids=123,456
authorizations List(UID String) Filter by Authorization uids. Separate with commas (,). authorizations=888,999
billing_accounts List(UID String) Filter by Billing Account uids. Separate with commas (,). billing_accounts=123,789
meters List(UID String) Filter by Meter uids. Separate with commas (,). meters=10101,110011

Returns a BillingSummaryListing object containing a list of Billing Summary objects. If the number of results is over 1000, a next parameter will have the link to the next in the series of lists.

// Example result
{
    "billing_summaries": [
        {"uid": "12837438", "authorization_uid": ...},
        {"uid": "12837439", "authorization_uid": ...},
        ...
    ],
    "next": null,
}

This is the object that contains the Billing Summary results for the request. We don't just return a straight list of results so that we can paginate results if needed. Currently, the maximum results per request is set at 1000.

Parameter Format Description Example
billing_summaries List(Billing Summary) List of Billing Summary results. [{"uid": ...}, ...]
next URL or null If there are more results than the page limit, this is a link to the next set of results. "https://utilityapi.com/api/v2/accounting/billing-summaries?after=234"
// Example BillingSummaryListing
{
    "billing_summaries": [...],
    "next": null,
}
Code Response Format Description
200 BillingSummaryListing Successful request.
202 Empty Request is too large to be synchronous, so building a cache asynchronously. See Retry-After header for how long to wait before trying again.
400 Error The query parameters included are malformed. Check the error in the response for the type of error:
  • invalid_param - One of the query parameters was invalid. Check the error description for more info.
We may add more error types in the future, so be able to handle unknown types.
401 Error Invalid or missing access_token. See our docs on Authentication for how to properly use your access_token.
429 N/A The request was rate limited. Check the Retry-After response header for how long to wait until retrying the request. Do not expect any specific response format for this error (could be html, json, or nothing).
500 N/A Internal server error. Do not expect any specific response format for this error (could be html, json, or nothing). This error is logged and will be fixed by our engineers.
503 N/A Site is currently down for maintenance. Do not expect any specific response format for this error (could be html, json, or nothing).
504 N/A We tried to build this request but timed out. Please try again later. Do not expect any specific response format for this error (could be html, json, or nothing).