---
type: api
title: Get itemized costs by deployments. Currently unavailable in self-hosted ECE.
description: Retrieves the itemized costs for the given deployment.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-get-costs-items-by-deployment
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-get-costs-items-by-deployment
products:
  - Elastic Cloud Enterprise
---

# Get itemized costs by deployments. Currently unavailable in self-hosted ECE.

deprecated

## Paths

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

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

#### Path Parameters

- `organization_id` (string)
  Identifier for the organization
- `deployment_id` (string)
  Id of a Deployment

## Description

Retrieves the itemized costs for the given deployment.

## 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`

The costs associated to a set items billed for a single deployment.

`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
- `data_transfer_and_storage` ([] DtsDimensionCosts)
  List of the detailed costs associated to the Data Transfer and Storage (DTS) dimensions
  - `cost` (number)
    Costs associated to the Data Transfer and Storage (DTS) dimensions for an organization
  - `name` (string)
    DTS dimension name
  - `quantity` ({} DtsQuantity)
    DTS quantity
    - `value` (integer)
      Raw quantity
    - `formatted_value` (string)
      Quantity in human readable format
  - `rate` ({} DtsRate)
    DTS Rate
    - `value` (number)
      Raw rate
    - `formatted_value` (string)
      Rate in human readable format
  - `sku` (string)
    DTS dimension Stock Keeping Unit (SKU)
  - `type` (string)
    Type of the DTS dimension usage
- `resources` ([] ItemCosts)
  Costs of the list of resources
  - `hours` (integer)
    Resource usage in hours
  - `instance_count` (integer)
    Number of instances
  - `period` ({} Period)
    Period
    - `start` (string)
      Start
    - `end` (string)
      End
  - `kind` (enum)
    Kind of resource
    Values: `elasticsearch`, `kibana`, `apm`, `integrations_server`, `appsearch`, `enterprise_search`
  - `price` (number)
    Resource price
  - `price_per_hour` (number)
    Price per hour
  - `name` (string)
    Resource name
  - `sku` (string)
    Stock Keeping Unit (SKU)
#### `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`

* The organization was not found. (code: `organization.not_found`)
* The Elasticsearch cluster was not found. (code: `billing_service.es_cluster_id_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 itemized costs for the given deployment of 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/{deployment_id}/items
```

#### curl

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

