> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/api-reference/cost-management-agent-apis/commitment-orchestrator/savings-detail.md).

# Savings Detail

## POST /accounts/{accountId}/v2/savings/detail

> Fetch savings details

```json
{"openapi":"3.0.1","info":{"title":"Commitment Orchestrator APIs","version":"1.0.0"},"tags":[],"servers":[{"url":"https://app.harness.io/gateway","description":"Production server"}],"paths":{"/accounts/{accountId}/v2/savings/detail":{"post":{"tags":["Savings Detail"],"summary":"Fetch savings details","parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string"},"description":"The account ID"},{"name":"routingId","in":"query","required":true,"schema":{"type":"string"},"description":"Routing ID"},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","format":"date"},"description":"Start date for the savings query"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","format":"date"},"description":"End date for the savings query"},{"name":"accountIdentifier","in":"query","required":true,"schema":{"type":"string"},"description":"Account identifier"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"group_by":{"type":"string","enum":["Regions","Commitment Type","Instance family"],"description":"The dimension to group savings by"},"is_harness_managed":{"type":"boolean","description":"Indicates whether the savings are managed by Harness"},"service":{"type":"string","enum":["Amazon Relational Database Service","Amazon Elastic Compute Cloud - Compute","VirtualMachines"],"default":"Amazon Elastic Compute Cloud - Compute"}},"required":["group_by","is_harness_managed"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsDetailResponse"}}}}}}}},"components":{"schemas":{"SavingsDetailResponse":{"type":"object","properties":{"ts":{"type":"integer","format":"int64","description":"Timestamp of the response"},"success":{"type":"boolean","description":"Indicates whether the request was successful"},"errors":{"type":"string","description":"Error message, if any"},"response":{"type":"object","additionalProperties":{"type":"object","properties":{"table":{"type":"object","properties":{"total":{"type":"number","format":"double","description":"Total savings amount"},"percentage":{"type":"number","format":"float","description":"Percentage savings"},"trend":{"type":"number","format":"float","description":"Trend in savings percentage","nullable":true}}},"chart":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date-time","description":"Date of the savings data"},"savings":{"type":"number","format":"double","description":"Savings amount for the date"}}}}}}}}}}}}
```
