savings estimate.md
Savings Estimate
API for estimating savings from uploaded billing files
Estimate savings from an uploaded billing file
Parses a completed PDF or CSV billing upload and returns normalized costs and provider-specific savings estimates.
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"tags":[{"name":"Savings Estimate","description":"API for estimating savings from uploaded billing files"}],"paths":{"/v1/org/{org_id}/savings-estimate":{"post":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsEstimate"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"$ref":"#/components/responses/UNPROCESSABLE_CONTENT"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsEstimateRequest"}}}},"tags":["Savings Estimate"],"summary":"Estimate savings from an uploaded billing file","description":"Parses a completed PDF or CSV billing upload and returns normalized costs and provider-specific savings estimates."}}},"components":{"schemas":{"SavingsEstimate":{"type":"object","properties":{"provider":{"type":["string","null"],"enum":["aws","azure","gcp",null]},"source_format":{"type":"string"},"period_start":{"type":["string","null"],"format":"date"},"period_end":{"type":["string","null"],"format":"date"},"account_id":{"type":["string","null"]},"currency":{"type":"string"},"is_projected":{"type":"boolean"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/CostLineItem"}},"total_cost":{"readOnly":true,"$ref":"#/components/schemas/ValueRange"},"total_savings_estimate":{"readOnly":true,"$ref":"#/components/schemas/ValueRange"}},"required":["account_id","currency","is_projected","line_items","period_end","period_start","provider","source_format","total_cost","total_savings_estimate"],"additionalProperties":false},"CostLineItem":{"type":"object","properties":{"service":{"type":"string"},"reservable_service":{"type":["string","null"]},"resource_type":{"type":["string","null"]},"usage_quantity":{"anyOf":[{"$ref":"#/components/schemas/ValueRange"},{"type":"null"}]},"usage_unit":{"type":"string","null"},"cost":{"$ref":"#/components/schemas/ValueRange"},"region":{"type":["string","null"]},"spend_type":{"enum":["on_demand","reserved","unreservable","unknown"]},"savings_estimate":{"anyOf":[{"$ref":"#/components/schemas/ValueRange"},{"type":"null"}]}},"required":["cost","region","reservable_service","resource_type","savings_estimate","service","spend_type","usage_quantity","usage_unit"],"additionalProperties":false},"ValueRange":{"type":"object","properties":{"estimate":{"type":"number"},"lower_bound":{"type":["number","null"]},"upper_bound":{"type":["number","null"]}},"required":["estimate","lower_bound","upper_bound"],"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{},"code":{"type":["string","null"]},"url":{"type":["string","null"]},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["message","timestamp","type"]},"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"status":{"type":"string","description":"Error name"},"message":{"type":"string","description":"Error message"},"errors":{"type":"object","description":"Errors","additionalProperties":{}}},"additionalProperties":false},"SavingsEstimateRequest":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid"}},"required":["upload_id"],"additionalProperties":false}},"responses":{"UNPROCESSABLE_CONTENT":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"DEFAULT_ERROR":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}