> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vantage.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Get costs for financial commitment report

> Return costs for a FinancialCommitmentReport.



## OpenAPI

````yaml https://api.vantage.sh/v2/oas_v3.json get /financial_commitment_reports/{financial_commitment_report_token}/costs
openapi: 3.0.1
info:
  title: Vantage
  description: Vantage API
  termsOfService: https://www.vantage.sh/terms-of-use
  contact:
    name: Vantage Support
    url: https://www.vantage.sh
    email: support@vantage.sh
  version: 2.0.0
servers:
  - url: https://api.vantage.sh/v2
security:
  - oauth2:
      - read
tags:
  - name: AccessGrants
    description: Operations about AccessGrants
  - name: Annotations
    description: Operations about Annotations
  - name: AnomalyAlerts
    description: Operations about AnomalyAlerts
  - name: AnomalyNotifications
    description: Operations about AnomalyNotifications
  - name: AuditLogs
    description: Operations about AuditLogs
  - name: BillingProfiles
    description: Operations about BillingProfiles
  - name: BillingRules
    description: Operations about BillingRules
  - name: BudgetAlerts
    description: Operations about BudgetAlerts
  - name: Budgets
    description: Operations about Budgets
  - name: BusinessMetrics
    description: Operations about BusinessMetrics
  - name: Canvases
    description: Operations about Canvases
  - name: CostAlertEvents
    description: Operations about CostAlertEvents
  - name: CostAlerts
    description: Operations about CostAlerts
  - name: CostProvider
    description: Operations about CostProviders
  - name: CostProviderAccounts
    description: Operations about CostProviderAccounts
  - name: Costs
    description: Operations about Costs
  - name: CostService
    description: Operations about CostServices
  - name: Dashboards
    description: Operations about Dashboards
  - name: DataExports
    description: Operations about DataExports
  - name: ExchangeRates
    description: Operations about ExchangeRates
  - name: FinancialCommitmentReports
    description: Operations about FinancialCommitmentReports
  - name: FinancialCommitments
    description: Operations about FinancialCommitments
  - name: Folders
    description: Operations about Folders
  - name: Integrations
    description: Operations about Integrations
  - name: Invoices
    description: Operations about Invoices
  - name: KubernetesEfficiencyReports
    description: Operations about KubernetesEfficiencyReports
  - name: ManagedAccounts
    description: Operations about ManagedAccounts
  - name: Me
    description: Operations about Mes
  - name: NetworkFlowLogs
    description: Operations about NetworkFlowLogs
  - name: NetworkFlowReports
    description: Operations about NetworkFlowReports
  - name: OpenAPISpecification
    description: Operations about OpenAPISpecifications
  - name: Ping
    description: Operations about Pings
  - name: Prices
    description: Operations about Prices
  - name: Recommendations
    description: Operations about Recommendations
  - name: RecommendationViews
    description: Operations about RecommendationViews
  - name: ReportForecasts
    description: Operations about ReportForecasts
  - name: ReportNotifications
    description: Operations about ReportNotifications
  - name: ResourceReports
    description: Operations about ResourceReports
  - name: Resources
    description: Operations about Resources
  - name: SavedFilters
    description: Operations about SavedFilters
  - name: ScenarioModels
    description: Operations about ScenarioModels
  - name: Segments
    description: Operations about Segments
  - name: Tags
    description: Operations about Tags
  - name: Teams
    description: Operations about Teams
  - name: UnitCosts
    description: Operations about UnitCosts
  - name: UserFeedback
    description: Operations about UserFeedbacks
  - name: Users
    description: Operations about Users
  - name: VirtualTags
    description: Operations about VirtualTags
  - name: Workspaces
    description: Operations about Workspaces
paths:
  /financial_commitment_reports/{financial_commitment_report_token}/costs:
    get:
      tags:
        - FinancialCommitmentReports
      summary: Get costs for financial commitment report
      description: Return costs for a FinancialCommitmentReport.
      operationId: getFinancialCommitmentReportCosts
      parameters:
        - name: financial_commitment_report_token
          in: path
          required: true
          schema:
            type: string
        - name: start_date
          in: query
          description: >-
            First date you would like to filter costs from, inclusive.
            YYYY-MM-DD formatted.
          schema:
            type: string
            format: date
          example: '2024-03-01'
        - name: end_date
          in: query
          description: >-
            Last date you would like to filter costs to, inclusive. YYYY-MM-DD
            formatted.
          schema:
            type: string
            format: date
          example: '2024-03-31'
        - name: date_bin
          in: query
          description: >-
            The date bin of the costs. Defaults to the report's configured date
            bucket. Hourly costs are limited to 14 days.
          schema:
            type: string
            enum:
              - hour
              - day
              - week
              - month
              - quarter
        - name: groupings
          in: query
          description: >-
            Group the results by up to 100 fields. Valid groupings: cost_type,
            commitment_type, commitment_id, service, resource_account_id,
            provider_account_id, region, cost_category, cost_sub_category,
            instance_type, tag:<label_name>. Serialize as a CSV query parameter:
            groupings=cost_type,service. Repeated parameters
            (groupings[]=cost_type&groupings[]=service) are also accepted.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
            x-style: form
            x-explode: false
          x-style: form
          x-explode: false
        - name: filter
          in: query
          description: >-
            The VQL filter to apply to the costs. Overrides the report's saved
            filter.
          schema:
            type: string
        - name: on_demand_costs_scope
          in: query
          description: 'The scope for the costs. Possible values: discountable, all.'
          schema:
            type: string
            enum:
              - discountable
              - all
        - name: order
          in: query
          description: Whether to order costs by date in an ascending or descending manner.
          schema:
            type: string
            default: desc
            enum:
              - asc
              - desc
        - name: limit
          in: query
          description: >-
            The number of cost rows to return, not the number of date buckets.
            The maximum is 5000.
          schema:
            maximum: 5000
            minimum: 1
            type: integer
            format: int32
            default: 2500
        - name: page
          in: query
          description: The page of results to return.
          schema:
            type: integer
            format: int32
            default: 1
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FinancialCommitmentReportCosts'
        '400':
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '402':
          description: PaymentRequired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '404':
          description: NotFound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '422':
          description: UnprocessableEntity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      security:
        - oauth2:
            - read
components:
  schemas:
    FinancialCommitmentReportCosts:
      required:
        - costs
        - total_amount
        - total_gross_amount
      type: object
      properties:
        links:
          $ref: '#/components/schemas/Links'
        total_amount:
          $ref: '#/components/schemas/CostPartial'
        total_gross_amount:
          $ref: '#/components/schemas/CostPartial'
        costs:
          type: array
          items:
            $ref: '#/components/schemas/FinancialCommitmentReportCost'
      description: FinancialCommitmentReportCosts model
    Errors:
      required:
        - errors
      type: object
      properties:
        links:
          $ref: '#/components/schemas/Links'
        errors:
          type: array
          nullable: false
          items:
            type: string
      description: Errors model
    Links:
      type: object
      properties:
        self:
          type: string
          description: The URL of the current page of results.
          nullable: true
        first:
          type: string
          description: The URL of the first page of results.
          nullable: true
        next:
          type: string
          description: The URL of the next page of results, if one exists.
          nullable: true
        last:
          type: string
          description: The URL of the last page of results, if one exists.
          nullable: true
        prev:
          type: string
          description: The URL of the previous page of results, if one exists.
          nullable: true
    CostPartial:
      required:
        - amount
        - currency
      type: object
      properties:
        amount:
          type: string
          description: The amount of the cost.
          nullable: false
          example: '4.25'
        currency:
          type: string
          description: The currency of the cost.
          nullable: false
          example: USD
    FinancialCommitmentReportCost:
      required:
        - accrued_at
        - amount
        - covered_gross_amount
        - currency
        - gross_amount
        - on_demand_amount
      type: object
      properties:
        accrued_at:
          type: string
          description: The date the cost was accrued. ISO 8601 Formatted.
          nullable: false
          example: '2024-03-01T00:00:00Z'
        amount:
          type: string
          description: The net (discounted) cost amount.
          nullable: false
          example: '100.00'
        gross_amount:
          type: string
          description: The gross cost amount before discounts.
          nullable: false
          example: '150.00'
        on_demand_amount:
          type: string
          description: The on-demand usage cost amount.
          nullable: false
          example: '50.00'
        covered_gross_amount:
          type: string
          description: The gross amount of costs covered by commitments.
          nullable: false
          example: '100.00'
        currency:
          type: string
          description: The currency of the cost.
          nullable: false
          example: USD
        cost_type:
          type: string
          description: The type of cost.
          nullable: true
          example: SavingsPlanCoveredUsage
        commitment_type:
          type: string
          description: The type of financial commitment.
          nullable: true
          example: savings_plan
        commitment_id:
          type: string
          description: The identifier of the financial commitment.
          nullable: true
          example: sp-1234567890abcdef0
        service:
          type: string
          description: The service which incurred the cost.
          nullable: true
          example: Amazon Elastic Compute Cloud - Compute
        resource_account_id:
          type: string
          description: The resource account ID which incurred the cost.
          nullable: true
          example: '123456789012'
        provider_account_id:
          type: string
          description: The billing account ID which incurred the cost.
          nullable: true
          example: '123456789012'
        region:
          type: string
          description: The region which incurred the cost.
          nullable: true
          example: us-east-1
        cost_category:
          type: string
          description: The category for the cost.
          nullable: true
          example: Data Transfer
        cost_sub_category:
          type: string
          description: The subcategory for the cost.
          nullable: true
          example: DataTransfer-Regional-Bytes
        instance_type:
          type: string
          description: The instance type which incurred the cost.
          nullable: true
          example: m5.xlarge
        tags:
          type: array
          description: The tag key/value pairs attached to the cost that was incurred.
          items:
            $ref: '#/components/schemas/FinancialCommitmentReportCostTag'
    FinancialCommitmentReportCostTag:
      required:
        - key
        - value
      type: object
      properties:
        key:
          type: string
          description: The tag key.
          nullable: false
          example: Name
        value:
          type: string
          description: The tag value. Null when the cost is not tagged with this key.
          nullable: true
          example: production
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://console.vantage.sh/account/profile
          scopes:
            read: Grants read access
            write: Grants write access

````