> 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/sp-inventory-overview.md).

# SP Inventory Overview

## Get Savings Plans Inventory Overview

> Fetches overview of Savings Plans inventory including total counts, distribution, status, and pending actions

```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/inventory/sp/overview":{"post":{"tags":["SP Inventory Overview"],"summary":"Get Savings Plans Inventory Overview","description":"Fetches overview of Savings Plans inventory including total counts, distribution, status, and pending actions","operationId":"GetSPInventoryOverview","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":"start_date","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Start date for the inventory period"},{"name":"end_date","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"End date for the inventory period"}],"requestBody":{"description":"Optional filters for the SP inventory","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventorySPAPIFilter"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SPInventoryOverviewResponse"}}}},"400":{"description":"Invalid request parameters"}}}}},"components":{"schemas":{"InventorySPAPIFilter":{"type":"object","properties":{"account_ids":{"type":"array","items":{"type":"string"},"description":"List of provider account IDs"},"cloud_account_ids":{"type":"array","items":{"type":"string"},"description":"List of cloud account IDs"},"instance_families":{"type":"array","items":{"type":"string"},"description":"List of instance families"},"payment_options":{"type":"array","items":{"type":"string","enum":["No Upfront","Partial Upfront","All Upfront"]},"description":"List of payment options"},"terms":{"type":"array","items":{"type":"number","format":"float64"},"description":"List of term lengths in years"},"plan_types":{"type":"array","items":{"type":"string","enum":["ComputeSavingsPlans","EC2InstanceSavingsPlans","SageMakerSavingsPlans","AzureComputeSavingsPlans"]},"description":"List of Savings Plan types. AzureComputeSavingsPlans applies to the VirtualMachines service."},"status":{"type":"array","items":{"type":"string","enum":["active","expired","pending","retired"]},"description":"List of statuses"},"is_harness_managed":{"type":"boolean","nullable":true,"description":"Filter by Harness managed status"},"service":{"type":"string","enum":["Amazon Relational Database Service","Amazon Elastic Compute Cloud - Compute","VirtualMachines"],"description":"Service to filter by. VirtualMachines returns Azure savings plans, whose plan type is AzureComputeSavingsPlans."},"regions":{"type":"array","items":{"type":"string"},"description":"List of regions"}}},"SPInventoryOverviewResponse":{"type":"object","properties":{"ts":{"type":"integer","description":"Response timestamp"},"success":{"type":"boolean","description":"Indicates if the request was successful"},"errors":{"type":"string","nullable":true,"description":"Error details, if any"},"response":{"$ref":"#/components/schemas/SPInventoryOverview"}}},"SPInventoryOverview":{"type":"object","properties":{"total":{"$ref":"#/components/schemas/TotalCount"},"distribution":{"$ref":"#/components/schemas/SPDistribution"},"status":{"$ref":"#/components/schemas/StatusBreakdown"},"actions":{"$ref":"#/components/schemas/ActionsBreakdown"}}},"TotalCount":{"type":"object","properties":{"purchased":{"type":"integer","description":"Total number of purchased RIs"},"managed":{"type":"integer","description":"Total number of managed RIs"}}},"SPDistribution":{"type":"object","properties":{"purchased":{"$ref":"#/components/schemas/PlanTypeDistribution"},"managed":{"$ref":"#/components/schemas/PlanTypeDistribution"}}},"PlanTypeDistribution":{"type":"object","properties":{"ec2_instance_savings_plans":{"$ref":"#/components/schemas/TypeCount"},"compute_savings_plans":{"$ref":"#/components/schemas/TypeCount"},"sage_maker_savings_plans":{"$ref":"#/components/schemas/TypeCount"},"azure_compute_savings_plans":{"allOf":[{"$ref":"#/components/schemas/TypeCount"}],"description":"Azure savings plans. Only returned for the VirtualMachines service."}}},"TypeCount":{"type":"object","properties":{"count":{"type":"integer","description":"Number of instances of this type"},"percentage":{"type":"number","format":"float","description":"Percentage of total instances"}}},"StatusBreakdown":{"type":"object","properties":{"expired":{"$ref":"#/components/schemas/StatusCount"},"expiring_soon":{"$ref":"#/components/schemas/StatusCount"},"active":{"$ref":"#/components/schemas/StatusCount"}}},"StatusCount":{"type":"object","properties":{"count":{"type":"integer","description":"Count of items in this status"},"label":{"type":"string","description":"Display label for the status"}}},"ActionsBreakdown":{"type":"object","properties":{"pending_approval":{"$ref":"#/components/schemas/StatusCount"}}}}}}
```
