List Costs
Get customer costs
get/v1/customers/{customer_id}/costs
Fetch daily pending costs for the specified customer, broken down by credit type and line items. Note: this is not supported for customers whose plan includes a UNIQUE-type billable metric.
Path Parameters
customer_idstring
formatuuid
Query Parameters
ending_beforestring
RFC 3339 timestamp (exclusive)
formatdate-time
starting_onstring
RFC 3339 timestamp (inclusive)
formatdate-time
limitnumber
optional
Max number of results that should be returned
minimum1
maximum100
next_pagestring
optional
Cursor that indicates where the next page of results should start.
Returns
dataarray of object
next_pagestring
curl https://api.metronome.com/v1/customers/$CUSTOMER_ID/costs \
-H "Authorization: Bearer $METRONOME_BEARER_TOKEN" \
-d '{}'
200 Example
{
"data": [
{
"credit_types": {
"foo": {
"cost": 0,
"line_item_breakdown": [
{
"cost": 0,
"name": "name",
"group_key": "group_key",
"group_value": "group_value"
}
],
"name": "name"
}
},
"end_timestamp": "2019-12-27T18:11:19.117Z",
"start_timestamp": "2019-12-27T18:11:19.117Z"
}
],
"next_page": "next_page"
}