> 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/spend-details.md).

# Spend Details

## Get detailed breakdown of spend across RI, SP and Ondemand cost with charts and tabular data

> Get detailed breakdown of spend across RI, SP and Ondemand cost

```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/{account_id}/v2/spend/detail":{"post":{"tags":["Spend Details"],"summary":"Get detailed breakdown of spend across RI, SP and Ondemand cost with charts and tabular data","description":"Get detailed breakdown of spend across RI, SP and Ondemand cost","operationId":"SpendDetails","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string"},"description":"Account Identifier for the entity."},{"name":"routingId","in":"query","required":true,"schema":{"type":"string"},"description":"Routing identifier for request processing."},{"name":"accountIdentifier","in":"query","required":true,"schema":{"type":"string"},"description":"Identifier of the account."},{"name":"start_date","in":"query","required":true,"schema":{"type":"string"},"description":"Start date for the spend calculation period."},{"name":"end_date","in":"query","required":true,"schema":{"type":"string"},"description":"End date for the spend calculation period."}],"requestBody":{"required":false,"description":"Supported filters for Spends","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SpendBreakdownFilter"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendBreakdownResponse"}}}},"400":{"description":"Invalid request parameters"}}}}},"components":{"schemas":{"SpendBreakdownFilter":{"type":"object","properties":{"regions":{"type":"array","items":{"type":"string"}},"instance_types":{"type":"array","items":{"type":"string"}},"cloud_account_ids":{"type":"array","items":{"type":"string"}},"service":{"type":"string","enum":["Amazon Elastic Compute Cloud - Compute","Amazon Relational Database Service","VirtualMachines"]}}},"SpendBreakdownResponse":{"type":"object","properties":{"ts":{"type":"integer","description":"Response timestamp"},"success":{"type":"boolean","description":"Specifies if the operation was successful"},"errors":{"type":"string","description":"Error message, if any"},"response":{"type":"object","properties":{"total":{"type":"number","format":"double","description":"Total spend value in dollars."},"trend":{"type":"number","format":"double","nullable":true,"description":"Trend in spend value compared to the previous period (in percentage)."},"ondemand":{"$ref":"#/components/schemas/SpendDetailed"},"savings_plans":{"$ref":"#/components/schemas/SpendDetailed"},"reserved_instances":{"$ref":"#/components/schemas/SpendDetailed"},"unused_commitments":{"$ref":"#/components/schemas/SpendDetailed"}}}}},"SpendDetailed":{"type":"object","properties":{"value":{"type":"number","format":"double","description":"Cost value"},"percentage":{"type":"number","format":"double","description":"Cost value as a percentage"}}}}}}
```
