---
type: api
title: Get itemized costs for the organization.
description: Retrieves costs associated with all items for the organization.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-billing/operation/operation-getcostsbyitemsv2
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-billing/operation/operation-getcostsbyitemsv2
products:
  - Elastic Cloud Hosted
---

# Get itemized costs for the organization.

- Server: `https://cloud.elastic.co` (Public)

## Paths

- `GET` `/api/v2/billing/organizations/{organization_id}/costs/items`

#### Path Parameters

- `organization_id` (string)
  Identifier for the organization

## Description

Retrieves costs associated with all items for the organization.
Admin callers receive all items; non-admin user callers are
filtered to items billed against instances they have access to.

## Query String Parameters

- `from` (string)
  A datetime for the beginning of the desired range. Any timezone offset is accepted and converted to UTC internally. Responses always contain UTC values. If no timezone offset is specified, UTC is assumed.
- `to` (string)
  A datetime for the end of the desired range. Any timezone offset is accepted and converted to UTC internally. Responses always contain UTC values. If no timezone offset is specified, UTC is assumed.
- `serverless_group_by` (enum)
  How to group the serverless items.
  Values: `product`, `product_family`

## Responses

#### `200`

Success. The costs associated to a set of items.

`application/json`

- `products` ([] Product)
  - `product_line_items` ([] ProductLineItem)
    - `display_quantity` ({} DisplayQuantity)
      Display quantity
      - `formatted_value` (string)
      - `type` (enum)
        Values: `default`, `normalized`
      - `value` (integer | number)
    - `kind` (string)
    - `name` (string)
    - `quantities` ([] ProductLineItemQuantity)
      - `from` (string)
      - `quantity` ({} Quantity)
        Quantity
        - `formatted_value` (string)
        - `value` (integer | number)
      - `rate` ({} Rate)
        Rate(value: 'int', formatted_value: 'str')
        - `formatted_value` (string)
        - `value` (integer)
      - `tiers` ([] ProductLineItemTier)
        - `max` (integer)
        - `min` (integer)
        - `quantity` ({} Quantity)
          Quantity
          - `formatted_value` (string)
          - `value` (integer | number)
        - `rate` ({} Rate)
          Rate(value: 'int', formatted_value: 'str')
          - `formatted_value` (string)
          - `value` (integer)
        - `total_ecu` (integer)
      - `to` (string)
      - `total_ecu` (integer)
    - `quantity` ({} Quantity)
      Quantity
      - `formatted_value` (string)
      - `value` (integer | number)
    - `rate` ({} Rate)
      Rate(value: 'int', formatted_value: 'str')
      - `formatted_value` (string)
      - `value` (integer)
    - `sku` (string)
    - `total_ecu` (integer)
    - `type` (string)
    - `unit` (string)
  - `total_ecu` (integer)
  - `type` (string)
- `total_ecu` (integer)
#### `400`

The specified data range is invalid.

#### `403`

Current user does not have access to the requested organization.

#### `404`

Organization not found.

#### `500`

Internal server error.

## Code Examples

#### Console

```console
GET /api/v2/billing/organizations/{organization_id}/costs/items?from={from}&to={to}
```

#### curl

```curl
curl -X GET "https://cloud.elastic.co/api/v2/billing/organizations/{organization_id}/costs/items?from={from}&to={to}"
```

