Skip to main content
GET
/
invoices
/
{invoice_token}
/
cost_report
Get cost report URL
curl --request GET \
  --url https://api.vantage.sh/v2/invoices/{invoice_token}/cost_report \
  --header 'Authorization: Bearer <token>'
{
  "token": "<string>",
  "title": "Production Environment",
  "folder_token": "<string>",
  "saved_filter_tokens": [
    "<string>"
  ],
  "business_metric_tokens_with_metadata": [
    {
      "business_metric_token": "bsnss_mtrc_1234",
      "unit_scale": "per_hundred",
      "label_filter": [
        ""
      ]
    }
  ],
  "filter": "<string>",
  "groupings": "provider, service",
  "settings": {
    "include_credits": false,
    "include_refunds": false,
    "include_discounts": true,
    "include_tax": true,
    "amortize": true,
    "unallocated": false,
    "aggregate_by": "cost",
    "show_previous_period": true
  },
  "created_at": "2021-07-09T00:00:00Z",
  "workspace_token": "<string>",
  "previous_period_start_date": "2024-06-01",
  "previous_period_end_date": "2024-06-15",
  "start_date": "2024-07-01",
  "end_date": "2024-07-15",
  "date_interval": "<string>",
  "chart_type": "<string>",
  "date_bin": "<string>",
  "chart_settings": {
    "y_axis_dimension": "<string>",
    "x_axis_dimension": "<string>"
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

invoice_token
string
required

Response

Returns cost report URL for the invoice period

CostReport model

token
string
title
string

The title of the CostReport.

Example:

"Production Environment"

folder_token
string

The token for the Folder the CostReport is a part of.

saved_filter_tokens
string[]

The tokens for the SavedFilters assigned to the CostReport.

business_metric_tokens_with_metadata
object[]

The tokens for the BusinessMetrics assigned to the CostReport, the unit scale, and label filter.

filter
string

The filter applied to the CostReport. Additional documentation available at https://docs.vantage.sh/vql.

groupings
string

The grouping aggregations applied to the filtered data.

Example:

"provider, service"

settings
object

Report settings.

created_at
string

The date and time, in UTC, the report was created. ISO 8601 Formatted.

Example:

"2021-07-09T00:00:00Z"

workspace_token
string

The token for the Workspace the CostReport is a part of.

previous_period_start_date
string

The previous period start date of the CostReport. ISO 8601 Formatted.

Example:

"2024-06-01"

previous_period_end_date
string

The previous period end date of the CostReport. ISO 8601 Formatted.

Example:

"2024-06-15"

start_date
string

The start date of the CostReports. ISO 8601 Formatted. Overwrites 'date_interval' if set.

Example:

"2024-07-01"

end_date
string

The end date of the CostReports. ISO 8601 Formatted. Overwrites 'date_interval' if set.

Example:

"2024-07-15"

date_interval
string

The date interval of the CostReport.

chart_type
string

The chart type of the CostReport.

date_bin
string

The date bin of the CostReport.

chart_settings
object