# ElasticS Billing API

**URL:** <https://discuss.elastic.co/t/elastics-billing-api/321385>\
**Category:** Elasticsearch\
**Created:** [December 16, 2022, 8:05am UTC](https://discuss.elastic.co/t/elastics-billing-api/321385 "2022-12-16T08:05:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bh03](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bh03/32/108703_2.png) [@bh03](https://discuss.elastic.co/u/bh03)\
**Post date:** [December 16, 2022, 8:05am UTC](https://discuss.elastic.co/t/elastics-billing-api/321385/1 "2022-12-16T08:05:17Z")

</div>

Hi all,

Currently, i am trying to fetch the billing details of my organization using the below API call

```auto
curl -XGET https://api.elastic-cloud.com/api/v1/billing/costs/{organization_id} \
-H "Authorization: ApiKey $EC_API_KEY"

```

I do get the response as

{'costs': {'total': mycost,  
'dimensions': [{'type': 'capacity', 'cost': mycost},  
{'type': 'data\_in', 'cost': 0.0},  
{'type': 'data\_internode', 'cost': mycost},  
{'type': 'data\_out', 'cost': mycost},  
{'type': 'storage\_api', 'cost': mycost},  
{'type': 'storage\_bytes', 'cost': mycost}]},  
'trials': 0.0,  
'hourly\_rate': mycost,  
'balance': {'available': 0.0, 'remaining': 0.0, 'line\_items': }}

According to this document, I should have a date in the Line\_items array  
[Definitions | Elasticsearch Service Documentation | Elastic](https://www.elastic.co/guide/en/cloud/current/definitions.html#CostsOverview)

How can I know my billing details calculated from which dates??

---

<div class="post-metadata">

**Author:** ![moni15moni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moni15moni/32/42311_2.png) [@moni15moni](https://discuss.elastic.co/u/moni15moni)\
**Post date:** [December 28, 2022, 10:43am UTC](https://discuss.elastic.co/t/elastics-billing-api/321385/2 "2022-12-28T10:43:59Z")

</div>

You can use like the below

```auto
curl -XGET 'https://api.elastic-cloud.com/api/v1/billing/costs/{id}/deployments?from=2022-12-19&to=2022-12-19' \
-H "Authorization: ApiKey {API_KEY}"

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 25, 2023, 10:44am UTC](https://discuss.elastic.co/t/elastics-billing-api/321385/3 "2023-01-25T10:44:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
