---
type: api
title: Get costs overview for the organization. Currently unavailable in self-hosted ECE.
description: Retrieves an overview of the costs by organization ID.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/v4/operation/operation-get-costs-overview
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/v4/operation/operation-get-costs-overview
products:
  - Elastic Cloud Enterprise
---

# Get costs overview for the organization. Currently unavailable in self-hosted ECE.

deprecated

## Paths

- `GET` `/billing/costs/{organization_id}`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/v4/authentication#basicauth)
- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/v4/authentication#apikey)

#### Path Parameters

- `organization_id` (string)
  Identifier for the organization

## Description

Retrieves an overview of the costs by organization ID.

## Query String Parameters

- `from` (string)
  A datetime for the beginning of the desired range for which to fetch costs. Defaults to start of current month.
- `to` (string)
  A datetime for the end of the desired range for which to fetch costs. Defaults to the current date.

## Responses

#### `200`

Top-level cost overview for the organization

`application/json`

- `costs` ({} Costs)
  Costs overview for an organization. All of the costs, credits, trials are expressed in Elastic Consumption Unit (ECU).
  - `total` (number)
    Total costs
  - `dimensions` ([] Dimension)
    A collection of billing details by dimension.
    - `type` (enum)
      The type of the billing dimension
      Values: `capacity`, `data_in`, `data_internode`, `data_out`, `storage_api`, `storage_bytes`
    - `cost` (number)
      The cost of the billing dimension
- `trials` (number)
  Trial costs for the organization
- `hourly_rate` (number)
  Hourly rate applied.
- `balance` ({} Balance)
  The available balance for an organization
  - `available` (number)
    Available balance
  - `remaining` (number)
    Remaining balance
  - `line_items` ([] SimplifiedLineItem)
    A collection of order line items for for an organization
    - `id` (string)
      Line Item ID
    - `ecu_quantity` (number)
      Original Elastic Consumption Unit (ECU) quantity
    - `ecu_balance` (number)
      Elastic Consumption Unit (ECU) Balance
    - `start` (string)
      Start of the line item's validity
    - `end` (string)
      Expiration of the line item
#### `400`

The specified date range is invalid. (code: `costs.invalid_date_range`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response Headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

#### `403`

The current user does not have access to the requested organization. (code: `organization.invalid_access`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response Headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

#### `404`

Organization not found. (code: `organization.not_found`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response Headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

#### `500`

An error occurred when fetching an overview of the costs for the organization. (code: `billing_service.failed_request`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response Headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

## Code Examples

#### Console

```console
GET /billing/costs/{organization_id}
```

#### curl

```curl
curl -X GET "/billing/costs/{organization_id}"
```

