Skip to main content
GET
/
customers
/
{customer_id}
/
costs
Get customer costs
curl --request GET \
  --url https://api.metronome.com/v1/customers/{customer_id}/costs \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "start_timestamp": "2024-01-01T00:00:00Z",
      "end_timestamp": "2024-01-02T00:00:00Z",
      "credit_types": {
        "2714e483-4ff1-48e4-9e25-ac732e8f24f2": {
          "name": "USD (cents)",
          "cost": 123.45,
          "line_item_breakdown": [
            {
              "name": "CPU hours",
              "cost": 123.45
            }
          ]
        }
      }
    }
  ],
  "next_page": null
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

customer_id
string<uuid>
required

Query Parameters

starting_on
string<date-time>
required

RFC 3339 timestamp (inclusive)

ending_before
string<date-time>
required

RFC 3339 timestamp (exclusive)

limit
integer

Max number of results that should be returned

Required range: 1 <= x <= 100
next_page
string

Cursor that indicates where the next page of results should start.

Response

Success

data
object[]
required
next_page
string | null
required
I