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

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

deprecated

## Paths

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

- [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 the costs associated with all deployments for the organization.

## Query String Parameters

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

## Responses

#### `200`

The costs associated to a set of products

`application/json`

- `total_cost` (number)
  Total cost for all deployments
- `deployments` ([] DeploymentCosts)
  Costs of the list of deployments
  - `deployment_id` (string)
    Elasticsearch deployment id
  - `deployment_name` (string)
    Elasticsearch deployment name
  - `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
  - `hourly_rate` (number)
    Price per hour
  - `period` ({} Period)
    Period
    - `start` (string)
      Start
    - `end` (string)
      End
#### `400`

Invalid date range specified. (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 the costs associated with all deployments 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}/deployments
```

#### curl

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

