Skip to main content
POST
/
organizations
/
{orgId}
/
dataexplorer
/
bills
/
download
/
csv
Download Bill data as a CSV.
curl --request POST \
  --url https://api.m3ter.com/organizations/{orgId}/dataexplorer/bills/download/csv \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "startDate": "2023-11-07T05:31:56Z",
  "endDate": "2023-11-07T05:31:56Z",
  "lineItemTypes": [
    "STANDING_CHARGE"
  ],
  "version": 123,
  "dimensions": [
    {
      "name": "<string>",
      "filter": [
        "<string>"
      ],
      "attributes": [
        "<string>"
      ]
    }
  ],
  "limit": 1000
}
'
{
  "downloadUrl": "<string>"
}

Authorizations

Authorization
string
header
required

m3ter supports machine to machine authentication using the clientCredentials OAuth2 flow.

The authorizationCode flow controls access for human users via the m3ter Console application.

Path Parameters

orgId
string
required

UUID of the organization

Body

application/json

Data Explorer Bill data query.

startDate
string<date-time>
required

ISO 8601 formatted start date for the aggregation.

endDate
string<date-time>
required

ISO 8601 formatted end date for the aggregation.

lineItemTypes
enum<string>[]
required

Line item types to query for.

Minimum array length: 1

See Bill Line Item Types for more information.

Available options:
STANDING_CHARGE,
USAGE,
COUNTER_RUNNING_TOTAL_CHARGE,
COUNTER_ADJUSTMENT_DEBIT,
COUNTER_ADJUSTMENT_CREDIT,
USAGE_CREDIT,
MINIMUM_SPEND,
MINIMUM_SPEND_REFUND,
CREDIT_DEDUCTION,
MANUAL_ADJUSTMENT,
CREDIT_MEMO,
DEBIT_MEMO,
COMMITMENT_CONSUMED,
COMMITMENT_FEE,
OVERAGE_SURCHARGE,
OVERAGE_USAGE,
BALANCE_CONSUMED,
BALANCE_FEE,
AD_HOC
version
integer<int64>

The version number of the entity:

  • Create entity: Not valid for initial insertion of new entity - do not use for Create. On initial Create, version is set at 1 and listed in the response.
  • Update Entity: On Update, version is required and must match the existing version because a check is performed to ensure sequential versioning is preserved. Version is incremented by 1 and listed in the response.
dimensions
object[]

Dimensions to filter by. Valid dimensions include 'account' and 'product name'

Maximum array length: 100
limit
integer<int32>

Limit the number of data points returned

Required range: 1 <= x <= 2000

Response

Contains a link to download the file.

Download link for Data Explorer data

downloadUrl
string<url>