---
type: api
title: Get itemized costs by instance for the organization.
description: Retrieves the costs associated to a set of items billed for a single instance.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-billing/operation/operation-getitemizedcostsbyinstancev2
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-billing/operation/operation-getitemizedcostsbyinstancev2
products:
  - Elastic Cloud Hosted
---

# Get itemized costs by instance for the organization.

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

## Paths

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

#### Path Parameters

- `organization_id` (string)
  Identifier for the organization
- `instance_id` (string)
  Identifier for the instance

## Description

Retrieves the costs associated to a set of items billed for a single instance.
Admin callers receive the data unconditionally; non-admin user callers
receive 403 if the instance is not in their accessible cloud resources.

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

## Responses

#### `200`

Success. The costs associated to a set of items billed for a single instance.

`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,
or (for non-admin callers) does not have access to the requested
instance.

#### `404`

Organization not found.

#### `500`

Internal server error.

## Code Examples

#### Console

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

#### curl

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

