> For the complete documentation index, see [llms.txt](https://docs.archera.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.archera.ai/api-reference/beta-api/cost-estimates-beta.md).

# Cost Estimates (Beta)

Saved cost-estimate baskets — catalog SKUs with quantities, priced live as monthly cost and savings under per-line-item commitment selections.

## List cost estimates

> Returns the org's cost estimates for the requested provider, most recently updated first.

```json
{"openapi":"3.0.2","info":{"title":"Archera.ai Beta API","version":"v1.0.0"},"tags":[{"name":"Cost Estimates (Beta)","description":"Saved cost-estimate baskets — catalog SKUs with quantities, priced live as monthly cost and savings under per-line-item commitment selections."}],"paths":{"/beta/v1/org/{org_id}/cost-estimates":{"get":{"parameters":[{"in":"query","name":"provider","description":"Cloud provider (aws, azure, gcp)","schema":{"type":"string","enum":["aws","azure","gcp"]},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CostEstimateListItem"}}}}},"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"}},"tags":["Cost Estimates (Beta)"],"summary":"List cost estimates","description":"Returns the org's cost estimates for the requested provider, most recently updated first."}}},"components":{"schemas":{"CostEstimateListItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"provider":{"description":"Cloud provider (aws, azure, gcp)","type":"string","enum":["aws","azure","gcp"]},"name":{"type":"string"},"description":{"type":"string","nullable":true},"line_count":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["created_at","description","id","line_count","name","provider","updated_at"],"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{"nullable":true},"code":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"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}},"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"}}}}}}}
```

## Create a cost estimate

> Creates a provider-specific cost estimate, optionally with initial lines from that provider. When \`source\_draft\_id\` is provided the create is idempotent per org: posting the same draft id again returns the existing estimate unchanged, so a retried post-signup import cannot duplicate.

```json
{"openapi":"3.0.2","info":{"title":"Archera.ai Beta API","version":"v1.0.0"},"tags":[{"name":"Cost Estimates (Beta)","description":"Saved cost-estimate baskets — catalog SKUs with quantities, priced live as monthly cost and savings under per-line-item commitment selections."}],"paths":{"/beta/v1/org/{org_id}/cost-estimates":{"post":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostEstimate"}}}},"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"},"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/CreateCostEstimateArgs"}}}},"tags":["Cost Estimates (Beta)"],"summary":"Create a cost estimate","description":"Creates a provider-specific cost estimate, optionally with initial lines from that provider. When `source_draft_id` is provided the create is idempotent per org: posting the same draft id again returns the existing estimate unchanged, so a retried post-signup import cannot duplicate."}}},"components":{"schemas":{"CostEstimate":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"provider":{"description":"Cloud provider (aws, azure, gcp)","type":"string","enum":["aws","azure","gcp"]},"name":{"type":"string"},"description":{"type":"string","nullable":true},"source_draft_id":{"type":"string","format":"uuid","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/CostEstimateLineItem"}},"pricing":{"description":"Computed pricing; null when include_pricing=false","anyOf":[{"$ref":"#/components/schemas/CostEstimatePricing"},{"type":"object","nullable":true}]}},"required":["created_at","description","id","line_items","name","provider","source_draft_id","updated_at"],"additionalProperties":false},"CostEstimateLineItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"catalog_sku":{"$ref":"#/components/schemas/CatalogSKUSummary"},"usage_unit":{"type":"string","nullable":true},"label":{"type":"string","nullable":true},"quantity":{"type":"number"},"quantity_basis":{"type":"string","enum":["resource_count","monthly_usage"]},"is_enabled":{"type":"boolean","description":"False = kept in the basket but excluded from totals and plans"},"selected_commitment_option":{"description":"Persisted selected commitment option, or null for on-demand","anyOf":[{"$ref":"#/components/schemas/CostEstimateSelectedCommitmentOption"},{"type":"object","nullable":true}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["catalog_sku","created_at","id","is_enabled","quantity","quantity_basis","selected_commitment_option","updated_at"],"additionalProperties":false},"CatalogSKUSummary":{"type":"object","properties":{"catalog_sku_org_id":{"type":"string"},"catalog_sku_id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["aws","azure","gcp",null],"nullable":true},"provider_sku_id":{"type":"string","nullable":true},"display_name":{"type":"string","nullable":true},"instance_type":{"type":"string","nullable":true},"service":{"type":"string","nullable":true},"provider_service":{"type":"string","nullable":true},"region_code":{"type":"string","nullable":true},"operating_system":{"type":"string","nullable":true},"database_engine":{"type":"string","nullable":true},"cache_engine":{"type":"string","nullable":true},"usage_type":{"type":"string","nullable":true}},"required":["cache_engine","catalog_sku_id","catalog_sku_org_id","database_engine","display_name","instance_type","operating_system","provider","provider_service","provider_sku_id","region_code","service","usage_type"],"additionalProperties":false},"CostEstimateSelectedCommitmentOption":{"type":"object","properties":{"contract_term":{"type":"string","enum":["one_year_gris","thirty_day_gris","two_month_gris","three_month_gris","four_month_gris","five_month_gris","six_month_gris","seven_month_gris","eight_month_gris","nine_month_gris","ten_month_gris","eleven_month_gris","twelve_month_gris","thirteen_month_gris","fourteen_month_gris","fifteen_month_gris","sixteen_month_gris","seventeen_month_gris","eighteen_month_gris","nineteen_month_gris","twenty_month_gris","twenty_one_month_gris","twenty_two_month_gris","twenty_three_month_gris","twenty_four_month_gris","twenty_five_month_gris","twenty_six_month_gris","twenty_seven_month_gris","twenty_eight_month_gris","twenty_nine_month_gris","thirty_month_gris","thirty_one_month_gris","thirty_two_month_gris","thirty_three_month_gris","thirty_four_month_gris","thirty_five_month_gris","one_year","two_year","three_year","five_year","zero_day","thirty_day","two_month","three_month","four_month","five_month","six_month","seven_month","eight_month","nine_month","ten_month","eleven_month","thirteen_month","fourteen_month","fifteen_month","sixteen_month","seventeen_month","eighteen_month","nineteen_month","twenty_month","twenty_one_month","twenty_two_month","twenty_three_month","twenty_five_month","twenty_six_month","twenty_seven_month","twenty_eight_month","twenty_nine_month","thirty_month","thirty_one_month","thirty_two_month","thirty_three_month","thirty_four_month","thirty_five_month"],"description":"Effective contract term name — the customer lock-in (e.g. 'one_year_gris', 'three_year'). A lease may shorten this relative to the native offer term."},"payment_option":{"default":null,"description":"Payment option of the chosen offer","type":"string","enum":["no_upfront","partial_upfront","all_upfront",null],"nullable":true},"commitment_type":{"type":"string","default":null,"maxLength":255,"description":"Commitment type (e.g. 'aws/savingsplan/Compute') — the comparison entry's `offer.type`, same vocabulary as commitment plan template contract_specs.","nullable":true},"lease_menu_item_id":{"type":"string","format":"uuid","default":null,"description":"Archera lease menu item backing the option. Non-null means the option is Archera-guaranteed; pins which lease backs it when two guaranteed options share a term and payment option.","nullable":true},"offer_org_id":{"type":"string","default":null,"maxLength":50,"description":"With offer_id, the exact-offer pin — copy both from the chosen comparison entry. Optional: the semantic fields alone re-match fine.","nullable":true},"offer_id":{"type":"string","format":"uuid","default":null,"description":"Exact offer pinned at selection time (the comparison entry's offer_id). Refines re-matching to the precise offer — e.g. standard vs convertible RIs at the same term and payment — and is never a pricing source.","nullable":true}},"required":["contract_term"],"additionalProperties":false},"CostEstimatePricing":{"type":"object","properties":{"line_items":{"type":"array","items":{"$ref":"#/components/schemas/CostEstimateLineItemPricing"}},"totals":{"$ref":"#/components/schemas/CostEstimateTotals"}},"required":["line_items","totals"],"additionalProperties":false},"CostEstimateLineItemPricing":{"type":"object","properties":{"line_item_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["ok","not_priceable","pricing_error","selected_option_unavailable"],"description":"'ok' = priced; 'not_priceable' = no positive on-demand price, or the SKU's usage unit changed since the quantity was entered; 'pricing_error' = commitment options could not be computed and the line item counts as on-demand until pricing succeeds; 'selected_option_unavailable' = persisted option no longer matches an offered option — the line item counts as on-demand in totals and the stored option is kept for re-matching later."},"detail":{"type":"string","nullable":true},"ondemand_monthly_cost":{"type":"number","nullable":true},"matched_commitment_option":{"description":"The current catalog option matching the persisted selection, priced at the line item's quantity — same entry shape as the catalog offer-comparison endpoint.","anyOf":[{"$ref":"#/components/schemas/CatalogSKUOfferComparisonEntry"},{"type":"object","nullable":true}]},"commitment_options":{"type":"array","description":"Options priced at the line item's quantity, descending discount — same entry shape as the catalog offer-comparison endpoint. Empty for non-reservable SKUs or SKUs without matching offers. For monthly_usage lines, cumulative demand is converted to its average catalog quantity before offer sizing. On the estimate read this is omitted unless include_options=true; the per-line read always includes it.","items":{"$ref":"#/components/schemas/CatalogSKUOfferComparisonEntry"}}},"required":["detail","line_item_id","matched_commitment_option","ondemand_monthly_cost","status"],"additionalProperties":false},"CatalogSKUOfferComparisonEntry":{"type":"object","properties":{"offer_id":{"type":"string","format":"uuid","description":"Commitment offer id."},"offer_org_id":{"type":"string","description":"Owning org of the offer row; with offer_id, the copyable exact-offer reference."},"offer":{"description":"Full offer details (type, region, instance, payment_option, etc).","allOf":[{"$ref":"#/components/schemas/CommitmentOffer"}]},"lease_menu_item_id":{"type":"string","format":"uuid","description":"Lease attached to this candidate, or null for a native (non-Archera) commitment.","nullable":true},"selected_amount":{"type":"number","description":"Commitment amount this candidate would be sized to — unit count for RIs / unit-based CUDs, dollar-per-hour rate for Savings Plans / spend-based CUDs. Match the underlying offer.type to interpret."},"commitment_type":{"type":"string","description":"Commitment type of the underlying offer — equal to offer.type (e.g. 'aws/AmazonEC2', 'aws/savingsplan/Compute', 'azure/Virtual Machines')."},"contract_term":{"description":"Effective commitment term — derived from the lease lockin hours when `lease_menu_item_id` is set (e.g. 'one_year_gris'), else from the offer's own duration (e.g. 'one_year', 'three_year'). The real lock-in period, not the offer's raw duration.","type":"string","enum":["one_year_gris","thirty_day_gris","two_month_gris","three_month_gris","four_month_gris","five_month_gris","six_month_gris","seven_month_gris","eight_month_gris","nine_month_gris","ten_month_gris","eleven_month_gris","twelve_month_gris","thirteen_month_gris","fourteen_month_gris","fifteen_month_gris","sixteen_month_gris","seventeen_month_gris","eighteen_month_gris","nineteen_month_gris","twenty_month_gris","twenty_one_month_gris","twenty_two_month_gris","twenty_three_month_gris","twenty_four_month_gris","twenty_five_month_gris","twenty_six_month_gris","twenty_seven_month_gris","twenty_eight_month_gris","twenty_nine_month_gris","thirty_month_gris","thirty_one_month_gris","thirty_two_month_gris","thirty_three_month_gris","thirty_four_month_gris","thirty_five_month_gris","one_year","two_year","three_year","five_year","zero_day","thirty_day","two_month","three_month","four_month","five_month","six_month","seven_month","eight_month","nine_month","ten_month","eleven_month","thirteen_month","fourteen_month","fifteen_month","sixteen_month","seventeen_month","eighteen_month","nineteen_month","twenty_month","twenty_one_month","twenty_two_month","twenty_three_month","twenty_five_month","twenty_six_month","twenty_seven_month","twenty_eight_month","twenty_nine_month","thirty_month","thirty_one_month","thirty_two_month","thirty_three_month","thirty_four_month","thirty_five_month",null],"nullable":true},"payment_option":{"description":"Payment option (no_upfront / partial_upfront / all_upfront).","type":"string","enum":["no_upfront","partial_upfront","all_upfront",null],"nullable":true},"discount_rate":{"type":"number","description":"Discount rate vs on-demand (0-1)."},"breakeven_days":{"type":"number","description":"Days until this candidate pays for itself; null if undefined.","nullable":true},"commitment_upfront_cost":{"type":"number","description":"One-time dollars at signing for this candidate. NOT a rate — do not sum with monthly-rate fields."},"commitment_financials_monthly_rate":{"description":"Projected economics as 730-hour monthly rates, same shape as line items / plans. `commitment_savings.net` is the headline savings vs running on-demand.","allOf":[{"$ref":"#/components/schemas/CommitmentFinancialsNoRebate"}]}},"required":["breakeven_days","commitment_financials_monthly_rate","commitment_type","commitment_upfront_cost","contract_term","discount_rate","lease_menu_item_id","offer","offer_id","offer_org_id","payment_option","selected_amount"],"additionalProperties":false},"CommitmentOffer":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Offer identifier"},"provider":{"description":"Cloud provider (aws, azure, gcp)","type":"string","enum":["aws","azure","gcp"]},"type":{"type":"string","description":"Commitment type (e.g. 'ri', 'savings_plan', 'cud')"},"region":{"type":"string","description":"Cloud region (e.g. 'us-east-1')","nullable":true},"duration_seconds":{"type":"integer","description":"Total commitment duration in seconds"},"instance_type":{"type":"string","description":"Instance type (e.g. 'm5.xlarge'), null for Savings Plans","nullable":true},"instance_family":{"type":"string","description":"Instance family (e.g. 'm5'), null for some commitment types","nullable":true},"offering_class":{"description":"Offering class (e.g. 'standard', 'convertible')","type":"string","enum":["standard","convertible",null],"nullable":true},"payment_option":{"description":"Payment option (e.g. 'no_upfront', 'partial_upfront', 'all_upfront')","type":"string","enum":["no_upfront","partial_upfront","all_upfront",null],"nullable":true},"plan_type":{"type":"string","description":"Plan type (e.g. 'Compute', 'EC2Instance')","nullable":true},"product_description":{"type":"string","description":"Product description (e.g. 'Linux/UNIX')","nullable":true},"display_name":{"type":"string","description":"Human-readable offer name","nullable":true},"guaranteed_display_name":{"type":"string","description":"Offer name when purchased as an Archera Guaranteed Commitment","nullable":true},"is_flexible":{"type":"boolean","description":"Whether the commitment has instance size flexibility","nullable":true}},"additionalProperties":false},"CommitmentFinancialsNoRebate":{"type":"object","properties":{"commitment_cost":{"$ref":"#/components/schemas/CommitmentCost"},"commitment_savings":{"$ref":"#/components/schemas/CommitmentSavings_Exclude_Rebate"},"covered_ondemand_cost":{"type":"number","description":"On-demand cost of usage covered by commitments — baseline for savings. NOT a cost paid by the user. Equals commitment_cost.breakdown.cloud_provider_cost.total + commitment_savings.gross."}},"additionalProperties":false},"CommitmentCost":{"type":"object","properties":{"total":{"type":"number","description":"Total paid (cloud_provider_cost.total + archera_premium). Headline 'cost'."},"breakdown":{"$ref":"#/components/schemas/CommitmentCostBreakdown"}},"additionalProperties":false},"CommitmentCostBreakdown":{"type":"object","properties":{"cloud_provider_cost":{"$ref":"#/components/schemas/CloudProviderCost"},"archera_premium":{"type":"number","description":"Archera premium — paid to Archera, equal to a portion of the savings Archera generates for this commitment (fee_rate * gross savings, only charged when gross > 0). Already included in commitment_cost.total (don't add on top). Because premium is only a fraction of gross, whenever archera_premium > 0 the commitment is net-positive after the fee. Native (non-Archera) commitments have premium = 0 and offer no such guarantee; an underutilized guaranteed commitment pre-lockin can also show net < 0 (the rebate that covers this kicks in post-lockin)."}},"additionalProperties":false},"CloudProviderCost":{"type":"object","properties":{"total":{"type":"number","description":"Amortized cost paid to the cloud provider. Sums with archera_premium to reach cost.total."},"breakdown":{"description":"Optional. Additive payment-cadence decomposition of total (recurring + amortized_upfront). Present only when purchase-term structure is known (individual commitment or plan).","allOf":[{"$ref":"#/components/schemas/CloudProviderCostBreakdown"}]}},"additionalProperties":false},"CloudProviderCostBreakdown":{"type":"object","properties":{"recurring":{"type":"number","description":"Recurring monthly payment to the cloud provider."},"amortized_upfront":{"type":"number","description":"Monthly share of the upfront payment, amortized over the term."}},"additionalProperties":false},"CommitmentSavings_Exclude_Rebate":{"type":"object","properties":{"net":{"type":"number","description":"Net savings after Archera premium, including any rebate. Actual bill reduction. Headline 'savings'."},"gross":{"type":"number","description":"Savings before Archera premium. Equals covered_ondemand_cost - commitment_cost.breakdown.cloud_provider_cost.total."}},"additionalProperties":false},"CostEstimateTotals":{"type":"object","properties":{"ondemand_monthly_cost":{"type":"number"},"estimated_monthly_cost":{"type":"number","description":"Sum of selected-option cost where selected, else on-demand"},"monthly_net_savings":{"type":"number","description":"ondemand_monthly_cost - estimated_monthly_cost"},"commitment_upfront_cost":{"type":"number","description":"One-time dollars at signing across selected options. NOT a rate — do not sum with monthly-rate fields."}},"required":["commitment_upfront_cost","estimated_monthly_cost","monthly_net_savings","ondemand_monthly_cost"],"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{"nullable":true},"code":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"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},"CreateCostEstimateArgs":{"type":"object","properties":{"provider":{"description":"Cloud provider (aws, azure, gcp)","type":"string","enum":["aws","azure","gcp"]},"name":{"type":"string","default":"Untitled estimate","minLength":1,"maxLength":255},"description":{"type":"string","default":null,"nullable":true},"source_draft_id":{"type":"string","format":"uuid","default":null,"description":"Client-generated UUID of a logged-out draft. Unique per org: posting the same value again returns the existing estimate instead of creating a duplicate (idempotent import).","nullable":true},"line_items":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/CostEstimateLineItemInput"}}},"required":["provider"],"additionalProperties":false},"CostEstimateLineItemInput":{"type":"object","properties":{"catalog_sku_id":{"type":"string","format":"uuid","description":"Catalog SKU id (from the catalog endpoints)"},"catalog_sku_org_id":{"type":"string","default":null,"description":"Optional owning org of the catalog SKU. Usually omitted: bare ids resolve against the public catalog plus your org's custom-priced SKUs, with a custom SKU winning an id collision (same behavior as the catalog offer-comparison endpoint).","nullable":true},"quantity":{"type":"number","minimum":"0","description":"Positive quantity, interpreted per quantity_basis"},"quantity_basis":{"description":"'resource_count' = a whole continuously provisioned quantity held 24/7 (instances, nodes, or whole capacity amounts like 8 GiB / 100 RCUs); 'monthly_usage' = cumulative usage over the month in the SKU's usage unit — also the form for fractional provisioned capacity (2.5 GiB held all month = 2.5 x 730 = 1825 GiBy.h, never quantity 2.5)","type":"string","enum":["resource_count","monthly_usage"]},"label":{"type":"string","default":null,"maxLength":255,"description":"Optional nickname for the line item (e.g. 'web tier')","nullable":true},"is_enabled":{"type":"boolean","default":true,"description":"False keeps the line item in the basket (still priced per line) but excludes it from totals and plan generation (what-if toggle)."},"selected_commitment_option":{"default":null,"description":"Optional selected commitment option; omit or null for on-demand","anyOf":[{"$ref":"#/components/schemas/CostEstimateSelectedCommitmentOption"},{"type":"object","nullable":true}]}},"required":["catalog_sku_id","quantity","quantity_basis"],"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"}}}}}}}
```

## Get a cost estimate with computed pricing

> Returns the estimate document plus pricing computed live against the current catalog and offers: per-line on-demand monthly cost, the re-matched selected option, and totals (estimated monthly cost and savings vs on-demand). Full per-line commitment option grids are omitted unless \`include\_options=true\` — read one line's grid via GET .../line-items/{line\_item\_id} instead. Nothing in \`pricing\` is ever persisted.

```json
{"openapi":"3.0.2","info":{"title":"Archera.ai Beta API","version":"v1.0.0"},"tags":[{"name":"Cost Estimates (Beta)","description":"Saved cost-estimate baskets — catalog SKUs with quantities, priced live as monthly cost and savings under per-line-item commitment selections."}],"paths":{"/beta/v1/org/{org_id}/cost-estimates/{estimate_id}":{"get":{"parameters":[{"in":"query","name":"payment_options","description":"Payment options to include in commitment option grids","schema":{"type":"array","minItems":1,"items":{"type":"string","enum":["no_upfront","partial_upfront","all_upfront"]}},"required":false,"explode":true,"style":"form"},{"in":"query","name":"only_most_flexible_commitment_type","description":"True limits each SKU's options to its most flexible commitment type. Default false: the calculator compares every applicable type.","schema":{"type":"boolean","default":false},"required":false},{"in":"query","name":"include_pricing","description":"Set false to skip the pricing computation (fast document read)","schema":{"type":"boolean","default":true},"required":false},{"in":"query","name":"include_options","description":"Set true to include the full per-line commitment_options grids (large). Default false: line items carry status, on-demand cost, and the re-matched selected option only — read one line's grid via GET .../line-items/{line_item_id} instead.","schema":{"type":"boolean","default":false},"required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostEstimate"}}}},"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"},"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"}},"tags":["Cost Estimates (Beta)"],"summary":"Get a cost estimate with computed pricing","description":"Returns the estimate document plus pricing computed live against the current catalog and offers: per-line on-demand monthly cost, the re-matched selected option, and totals (estimated monthly cost and savings vs on-demand). Full per-line commitment option grids are omitted unless `include_options=true` — read one line's grid via GET .../line-items/{line_item_id} instead. Nothing in `pricing` is ever persisted."}}},"components":{"schemas":{"CostEstimate":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"provider":{"description":"Cloud provider (aws, azure, gcp)","type":"string","enum":["aws","azure","gcp"]},"name":{"type":"string"},"description":{"type":"string","nullable":true},"source_draft_id":{"type":"string","format":"uuid","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/CostEstimateLineItem"}},"pricing":{"description":"Computed pricing; null when include_pricing=false","anyOf":[{"$ref":"#/components/schemas/CostEstimatePricing"},{"type":"object","nullable":true}]}},"required":["created_at","description","id","line_items","name","provider","source_draft_id","updated_at"],"additionalProperties":false},"CostEstimateLineItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"catalog_sku":{"$ref":"#/components/schemas/CatalogSKUSummary"},"usage_unit":{"type":"string","nullable":true},"label":{"type":"string","nullable":true},"quantity":{"type":"number"},"quantity_basis":{"type":"string","enum":["resource_count","monthly_usage"]},"is_enabled":{"type":"boolean","description":"False = kept in the basket but excluded from totals and plans"},"selected_commitment_option":{"description":"Persisted selected commitment option, or null for on-demand","anyOf":[{"$ref":"#/components/schemas/CostEstimateSelectedCommitmentOption"},{"type":"object","nullable":true}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["catalog_sku","created_at","id","is_enabled","quantity","quantity_basis","selected_commitment_option","updated_at"],"additionalProperties":false},"CatalogSKUSummary":{"type":"object","properties":{"catalog_sku_org_id":{"type":"string"},"catalog_sku_id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["aws","azure","gcp",null],"nullable":true},"provider_sku_id":{"type":"string","nullable":true},"display_name":{"type":"string","nullable":true},"instance_type":{"type":"string","nullable":true},"service":{"type":"string","nullable":true},"provider_service":{"type":"string","nullable":true},"region_code":{"type":"string","nullable":true},"operating_system":{"type":"string","nullable":true},"database_engine":{"type":"string","nullable":true},"cache_engine":{"type":"string","nullable":true},"usage_type":{"type":"string","nullable":true}},"required":["cache_engine","catalog_sku_id","catalog_sku_org_id","database_engine","display_name","instance_type","operating_system","provider","provider_service","provider_sku_id","region_code","service","usage_type"],"additionalProperties":false},"CostEstimateSelectedCommitmentOption":{"type":"object","properties":{"contract_term":{"type":"string","enum":["one_year_gris","thirty_day_gris","two_month_gris","three_month_gris","four_month_gris","five_month_gris","six_month_gris","seven_month_gris","eight_month_gris","nine_month_gris","ten_month_gris","eleven_month_gris","twelve_month_gris","thirteen_month_gris","fourteen_month_gris","fifteen_month_gris","sixteen_month_gris","seventeen_month_gris","eighteen_month_gris","nineteen_month_gris","twenty_month_gris","twenty_one_month_gris","twenty_two_month_gris","twenty_three_month_gris","twenty_four_month_gris","twenty_five_month_gris","twenty_six_month_gris","twenty_seven_month_gris","twenty_eight_month_gris","twenty_nine_month_gris","thirty_month_gris","thirty_one_month_gris","thirty_two_month_gris","thirty_three_month_gris","thirty_four_month_gris","thirty_five_month_gris","one_year","two_year","three_year","five_year","zero_day","thirty_day","two_month","three_month","four_month","five_month","six_month","seven_month","eight_month","nine_month","ten_month","eleven_month","thirteen_month","fourteen_month","fifteen_month","sixteen_month","seventeen_month","eighteen_month","nineteen_month","twenty_month","twenty_one_month","twenty_two_month","twenty_three_month","twenty_five_month","twenty_six_month","twenty_seven_month","twenty_eight_month","twenty_nine_month","thirty_month","thirty_one_month","thirty_two_month","thirty_three_month","thirty_four_month","thirty_five_month"],"description":"Effective contract term name — the customer lock-in (e.g. 'one_year_gris', 'three_year'). A lease may shorten this relative to the native offer term."},"payment_option":{"default":null,"description":"Payment option of the chosen offer","type":"string","enum":["no_upfront","partial_upfront","all_upfront",null],"nullable":true},"commitment_type":{"type":"string","default":null,"maxLength":255,"description":"Commitment type (e.g. 'aws/savingsplan/Compute') — the comparison entry's `offer.type`, same vocabulary as commitment plan template contract_specs.","nullable":true},"lease_menu_item_id":{"type":"string","format":"uuid","default":null,"description":"Archera lease menu item backing the option. Non-null means the option is Archera-guaranteed; pins which lease backs it when two guaranteed options share a term and payment option.","nullable":true},"offer_org_id":{"type":"string","default":null,"maxLength":50,"description":"With offer_id, the exact-offer pin — copy both from the chosen comparison entry. Optional: the semantic fields alone re-match fine.","nullable":true},"offer_id":{"type":"string","format":"uuid","default":null,"description":"Exact offer pinned at selection time (the comparison entry's offer_id). Refines re-matching to the precise offer — e.g. standard vs convertible RIs at the same term and payment — and is never a pricing source.","nullable":true}},"required":["contract_term"],"additionalProperties":false},"CostEstimatePricing":{"type":"object","properties":{"line_items":{"type":"array","items":{"$ref":"#/components/schemas/CostEstimateLineItemPricing"}},"totals":{"$ref":"#/components/schemas/CostEstimateTotals"}},"required":["line_items","totals"],"additionalProperties":false},"CostEstimateLineItemPricing":{"type":"object","properties":{"line_item_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["ok","not_priceable","pricing_error","selected_option_unavailable"],"description":"'ok' = priced; 'not_priceable' = no positive on-demand price, or the SKU's usage unit changed since the quantity was entered; 'pricing_error' = commitment options could not be computed and the line item counts as on-demand until pricing succeeds; 'selected_option_unavailable' = persisted option no longer matches an offered option — the line item counts as on-demand in totals and the stored option is kept for re-matching later."},"detail":{"type":"string","nullable":true},"ondemand_monthly_cost":{"type":"number","nullable":true},"matched_commitment_option":{"description":"The current catalog option matching the persisted selection, priced at the line item's quantity — same entry shape as the catalog offer-comparison endpoint.","anyOf":[{"$ref":"#/components/schemas/CatalogSKUOfferComparisonEntry"},{"type":"object","nullable":true}]},"commitment_options":{"type":"array","description":"Options priced at the line item's quantity, descending discount — same entry shape as the catalog offer-comparison endpoint. Empty for non-reservable SKUs or SKUs without matching offers. For monthly_usage lines, cumulative demand is converted to its average catalog quantity before offer sizing. On the estimate read this is omitted unless include_options=true; the per-line read always includes it.","items":{"$ref":"#/components/schemas/CatalogSKUOfferComparisonEntry"}}},"required":["detail","line_item_id","matched_commitment_option","ondemand_monthly_cost","status"],"additionalProperties":false},"CatalogSKUOfferComparisonEntry":{"type":"object","properties":{"offer_id":{"type":"string","format":"uuid","description":"Commitment offer id."},"offer_org_id":{"type":"string","description":"Owning org of the offer row; with offer_id, the copyable exact-offer reference."},"offer":{"description":"Full offer details (type, region, instance, payment_option, etc).","allOf":[{"$ref":"#/components/schemas/CommitmentOffer"}]},"lease_menu_item_id":{"type":"string","format":"uuid","description":"Lease attached to this candidate, or null for a native (non-Archera) commitment.","nullable":true},"selected_amount":{"type":"number","description":"Commitment amount this candidate would be sized to — unit count for RIs / unit-based CUDs, dollar-per-hour rate for Savings Plans / spend-based CUDs. Match the underlying offer.type to interpret."},"commitment_type":{"type":"string","description":"Commitment type of the underlying offer — equal to offer.type (e.g. 'aws/AmazonEC2', 'aws/savingsplan/Compute', 'azure/Virtual Machines')."},"contract_term":{"description":"Effective commitment term — derived from the lease lockin hours when `lease_menu_item_id` is set (e.g. 'one_year_gris'), else from the offer's own duration (e.g. 'one_year', 'three_year'). The real lock-in period, not the offer's raw duration.","type":"string","enum":["one_year_gris","thirty_day_gris","two_month_gris","three_month_gris","four_month_gris","five_month_gris","six_month_gris","seven_month_gris","eight_month_gris","nine_month_gris","ten_month_gris","eleven_month_gris","twelve_month_gris","thirteen_month_gris","fourteen_month_gris","fifteen_month_gris","sixteen_month_gris","seventeen_month_gris","eighteen_month_gris","nineteen_month_gris","twenty_month_gris","twenty_one_month_gris","twenty_two_month_gris","twenty_three_month_gris","twenty_four_month_gris","twenty_five_month_gris","twenty_six_month_gris","twenty_seven_month_gris","twenty_eight_month_gris","twenty_nine_month_gris","thirty_month_gris","thirty_one_month_gris","thirty_two_month_gris","thirty_three_month_gris","thirty_four_month_gris","thirty_five_month_gris","one_year","two_year","three_year","five_year","zero_day","thirty_day","two_month","three_month","four_month","five_month","six_month","seven_month","eight_month","nine_month","ten_month","eleven_month","thirteen_month","fourteen_month","fifteen_month","sixteen_month","seventeen_month","eighteen_month","nineteen_month","twenty_month","twenty_one_month","twenty_two_month","twenty_three_month","twenty_five_month","twenty_six_month","twenty_seven_month","twenty_eight_month","twenty_nine_month","thirty_month","thirty_one_month","thirty_two_month","thirty_three_month","thirty_four_month","thirty_five_month",null],"nullable":true},"payment_option":{"description":"Payment option (no_upfront / partial_upfront / all_upfront).","type":"string","enum":["no_upfront","partial_upfront","all_upfront",null],"nullable":true},"discount_rate":{"type":"number","description":"Discount rate vs on-demand (0-1)."},"breakeven_days":{"type":"number","description":"Days until this candidate pays for itself; null if undefined.","nullable":true},"commitment_upfront_cost":{"type":"number","description":"One-time dollars at signing for this candidate. NOT a rate — do not sum with monthly-rate fields."},"commitment_financials_monthly_rate":{"description":"Projected economics as 730-hour monthly rates, same shape as line items / plans. `commitment_savings.net` is the headline savings vs running on-demand.","allOf":[{"$ref":"#/components/schemas/CommitmentFinancialsNoRebate"}]}},"required":["breakeven_days","commitment_financials_monthly_rate","commitment_type","commitment_upfront_cost","contract_term","discount_rate","lease_menu_item_id","offer","offer_id","offer_org_id","payment_option","selected_amount"],"additionalProperties":false},"CommitmentOffer":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Offer identifier"},"provider":{"description":"Cloud provider (aws, azure, gcp)","type":"string","enum":["aws","azure","gcp"]},"type":{"type":"string","description":"Commitment type (e.g. 'ri', 'savings_plan', 'cud')"},"region":{"type":"string","description":"Cloud region (e.g. 'us-east-1')","nullable":true},"duration_seconds":{"type":"integer","description":"Total commitment duration in seconds"},"instance_type":{"type":"string","description":"Instance type (e.g. 'm5.xlarge'), null for Savings Plans","nullable":true},"instance_family":{"type":"string","description":"Instance family (e.g. 'm5'), null for some commitment types","nullable":true},"offering_class":{"description":"Offering class (e.g. 'standard', 'convertible')","type":"string","enum":["standard","convertible",null],"nullable":true},"payment_option":{"description":"Payment option (e.g. 'no_upfront', 'partial_upfront', 'all_upfront')","type":"string","enum":["no_upfront","partial_upfront","all_upfront",null],"nullable":true},"plan_type":{"type":"string","description":"Plan type (e.g. 'Compute', 'EC2Instance')","nullable":true},"product_description":{"type":"string","description":"Product description (e.g. 'Linux/UNIX')","nullable":true},"display_name":{"type":"string","description":"Human-readable offer name","nullable":true},"guaranteed_display_name":{"type":"string","description":"Offer name when purchased as an Archera Guaranteed Commitment","nullable":true},"is_flexible":{"type":"boolean","description":"Whether the commitment has instance size flexibility","nullable":true}},"additionalProperties":false},"CommitmentFinancialsNoRebate":{"type":"object","properties":{"commitment_cost":{"$ref":"#/components/schemas/CommitmentCost"},"commitment_savings":{"$ref":"#/components/schemas/CommitmentSavings_Exclude_Rebate"},"covered_ondemand_cost":{"type":"number","description":"On-demand cost of usage covered by commitments — baseline for savings. NOT a cost paid by the user. Equals commitment_cost.breakdown.cloud_provider_cost.total + commitment_savings.gross."}},"additionalProperties":false},"CommitmentCost":{"type":"object","properties":{"total":{"type":"number","description":"Total paid (cloud_provider_cost.total + archera_premium). Headline 'cost'."},"breakdown":{"$ref":"#/components/schemas/CommitmentCostBreakdown"}},"additionalProperties":false},"CommitmentCostBreakdown":{"type":"object","properties":{"cloud_provider_cost":{"$ref":"#/components/schemas/CloudProviderCost"},"archera_premium":{"type":"number","description":"Archera premium — paid to Archera, equal to a portion of the savings Archera generates for this commitment (fee_rate * gross savings, only charged when gross > 0). Already included in commitment_cost.total (don't add on top). Because premium is only a fraction of gross, whenever archera_premium > 0 the commitment is net-positive after the fee. Native (non-Archera) commitments have premium = 0 and offer no such guarantee; an underutilized guaranteed commitment pre-lockin can also show net < 0 (the rebate that covers this kicks in post-lockin)."}},"additionalProperties":false},"CloudProviderCost":{"type":"object","properties":{"total":{"type":"number","description":"Amortized cost paid to the cloud provider. Sums with archera_premium to reach cost.total."},"breakdown":{"description":"Optional. Additive payment-cadence decomposition of total (recurring + amortized_upfront). Present only when purchase-term structure is known (individual commitment or plan).","allOf":[{"$ref":"#/components/schemas/CloudProviderCostBreakdown"}]}},"additionalProperties":false},"CloudProviderCostBreakdown":{"type":"object","properties":{"recurring":{"type":"number","description":"Recurring monthly payment to the cloud provider."},"amortized_upfront":{"type":"number","description":"Monthly share of the upfront payment, amortized over the term."}},"additionalProperties":false},"CommitmentSavings_Exclude_Rebate":{"type":"object","properties":{"net":{"type":"number","description":"Net savings after Archera premium, including any rebate. Actual bill reduction. Headline 'savings'."},"gross":{"type":"number","description":"Savings before Archera premium. Equals covered_ondemand_cost - commitment_cost.breakdown.cloud_provider_cost.total."}},"additionalProperties":false},"CostEstimateTotals":{"type":"object","properties":{"ondemand_monthly_cost":{"type":"number"},"estimated_monthly_cost":{"type":"number","description":"Sum of selected-option cost where selected, else on-demand"},"monthly_net_savings":{"type":"number","description":"ondemand_monthly_cost - estimated_monthly_cost"},"commitment_upfront_cost":{"type":"number","description":"One-time dollars at signing across selected options. NOT a rate — do not sum with monthly-rate fields."}},"required":["commitment_upfront_cost","estimated_monthly_cost","monthly_net_savings","ondemand_monthly_cost"],"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{"nullable":true},"code":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"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}},"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"}}}}}}}
```

## Delete a cost estimate

> Soft-deletes the estimate: it disappears from list and detail reads, while plans generated from it and shares keep their provenance links. Its draft id (if any) is released for re-import.

```json
{"openapi":"3.0.2","info":{"title":"Archera.ai Beta API","version":"v1.0.0"},"tags":[{"name":"Cost Estimates (Beta)","description":"Saved cost-estimate baskets — catalog SKUs with quantities, priced live as monthly cost and savings under per-line-item commitment selections."}],"paths":{"/beta/v1/org/{org_id}/cost-estimates/{estimate_id}":{"delete":{"responses":{"204":{"description":"No Content"},"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"},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"tags":["Cost Estimates (Beta)"],"summary":"Delete a cost estimate","description":"Soft-deletes the estimate: it disappears from list and detail reads, while plans generated from it and shares keep their provenance links. Its draft id (if any) is released for re-import."}}},"components":{"schemas":{"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{"nullable":true},"code":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"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}},"responses":{"DEFAULT_ERROR":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}
```

## Update a cost estimate

> Merge-semantic update of name / description.

```json
{"openapi":"3.0.2","info":{"title":"Archera.ai Beta API","version":"v1.0.0"},"tags":[{"name":"Cost Estimates (Beta)","description":"Saved cost-estimate baskets — catalog SKUs with quantities, priced live as monthly cost and savings under per-line-item commitment selections."}],"paths":{"/beta/v1/org/{org_id}/cost-estimates/{estimate_id}":{"patch":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostEstimate"}}}},"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"},"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/UpdateCostEstimateArgs"}}}},"tags":["Cost Estimates (Beta)"],"summary":"Update a cost estimate","description":"Merge-semantic update of name / description."}}},"components":{"schemas":{"CostEstimate":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"provider":{"description":"Cloud provider (aws, azure, gcp)","type":"string","enum":["aws","azure","gcp"]},"name":{"type":"string"},"description":{"type":"string","nullable":true},"source_draft_id":{"type":"string","format":"uuid","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/CostEstimateLineItem"}},"pricing":{"description":"Computed pricing; null when include_pricing=false","anyOf":[{"$ref":"#/components/schemas/CostEstimatePricing"},{"type":"object","nullable":true}]}},"required":["created_at","description","id","line_items","name","provider","source_draft_id","updated_at"],"additionalProperties":false},"CostEstimateLineItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"catalog_sku":{"$ref":"#/components/schemas/CatalogSKUSummary"},"usage_unit":{"type":"string","nullable":true},"label":{"type":"string","nullable":true},"quantity":{"type":"number"},"quantity_basis":{"type":"string","enum":["resource_count","monthly_usage"]},"is_enabled":{"type":"boolean","description":"False = kept in the basket but excluded from totals and plans"},"selected_commitment_option":{"description":"Persisted selected commitment option, or null for on-demand","anyOf":[{"$ref":"#/components/schemas/CostEstimateSelectedCommitmentOption"},{"type":"object","nullable":true}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["catalog_sku","created_at","id","is_enabled","quantity","quantity_basis","selected_commitment_option","updated_at"],"additionalProperties":false},"CatalogSKUSummary":{"type":"object","properties":{"catalog_sku_org_id":{"type":"string"},"catalog_sku_id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["aws","azure","gcp",null],"nullable":true},"provider_sku_id":{"type":"string","nullable":true},"display_name":{"type":"string","nullable":true},"instance_type":{"type":"string","nullable":true},"service":{"type":"string","nullable":true},"provider_service":{"type":"string","nullable":true},"region_code":{"type":"string","nullable":true},"operating_system":{"type":"string","nullable":true},"database_engine":{"type":"string","nullable":true},"cache_engine":{"type":"string","nullable":true},"usage_type":{"type":"string","nullable":true}},"required":["cache_engine","catalog_sku_id","catalog_sku_org_id","database_engine","display_name","instance_type","operating_system","provider","provider_service","provider_sku_id","region_code","service","usage_type"],"additionalProperties":false},"CostEstimateSelectedCommitmentOption":{"type":"object","properties":{"contract_term":{"type":"string","enum":["one_year_gris","thirty_day_gris","two_month_gris","three_month_gris","four_month_gris","five_month_gris","six_month_gris","seven_month_gris","eight_month_gris","nine_month_gris","ten_month_gris","eleven_month_gris","twelve_month_gris","thirteen_month_gris","fourteen_month_gris","fifteen_month_gris","sixteen_month_gris","seventeen_month_gris","eighteen_month_gris","nineteen_month_gris","twenty_month_gris","twenty_one_month_gris","twenty_two_month_gris","twenty_three_month_gris","twenty_four_month_gris","twenty_five_month_gris","twenty_six_month_gris","twenty_seven_month_gris","twenty_eight_month_gris","twenty_nine_month_gris","thirty_month_gris","thirty_one_month_gris","thirty_two_month_gris","thirty_three_month_gris","thirty_four_month_gris","thirty_five_month_gris","one_year","two_year","three_year","five_year","zero_day","thirty_day","two_month","three_month","four_month","five_month","six_month","seven_month","eight_month","nine_month","ten_month","eleven_month","thirteen_month","fourteen_month","fifteen_month","sixteen_month","seventeen_month","eighteen_month","nineteen_month","twenty_month","twenty_one_month","twenty_two_month","twenty_three_month","twenty_five_month","twenty_six_month","twenty_seven_month","twenty_eight_month","twenty_nine_month","thirty_month","thirty_one_month","thirty_two_month","thirty_three_month","thirty_four_month","thirty_five_month"],"description":"Effective contract term name — the customer lock-in (e.g. 'one_year_gris', 'three_year'). A lease may shorten this relative to the native offer term."},"payment_option":{"default":null,"description":"Payment option of the chosen offer","type":"string","enum":["no_upfront","partial_upfront","all_upfront",null],"nullable":true},"commitment_type":{"type":"string","default":null,"maxLength":255,"description":"Commitment type (e.g. 'aws/savingsplan/Compute') — the comparison entry's `offer.type`, same vocabulary as commitment plan template contract_specs.","nullable":true},"lease_menu_item_id":{"type":"string","format":"uuid","default":null,"description":"Archera lease menu item backing the option. Non-null means the option is Archera-guaranteed; pins which lease backs it when two guaranteed options share a term and payment option.","nullable":true},"offer_org_id":{"type":"string","default":null,"maxLength":50,"description":"With offer_id, the exact-offer pin — copy both from the chosen comparison entry. Optional: the semantic fields alone re-match fine.","nullable":true},"offer_id":{"type":"string","format":"uuid","default":null,"description":"Exact offer pinned at selection time (the comparison entry's offer_id). Refines re-matching to the precise offer — e.g. standard vs convertible RIs at the same term and payment — and is never a pricing source.","nullable":true}},"required":["contract_term"],"additionalProperties":false},"CostEstimatePricing":{"type":"object","properties":{"line_items":{"type":"array","items":{"$ref":"#/components/schemas/CostEstimateLineItemPricing"}},"totals":{"$ref":"#/components/schemas/CostEstimateTotals"}},"required":["line_items","totals"],"additionalProperties":false},"CostEstimateLineItemPricing":{"type":"object","properties":{"line_item_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["ok","not_priceable","pricing_error","selected_option_unavailable"],"description":"'ok' = priced; 'not_priceable' = no positive on-demand price, or the SKU's usage unit changed since the quantity was entered; 'pricing_error' = commitment options could not be computed and the line item counts as on-demand until pricing succeeds; 'selected_option_unavailable' = persisted option no longer matches an offered option — the line item counts as on-demand in totals and the stored option is kept for re-matching later."},"detail":{"type":"string","nullable":true},"ondemand_monthly_cost":{"type":"number","nullable":true},"matched_commitment_option":{"description":"The current catalog option matching the persisted selection, priced at the line item's quantity — same entry shape as the catalog offer-comparison endpoint.","anyOf":[{"$ref":"#/components/schemas/CatalogSKUOfferComparisonEntry"},{"type":"object","nullable":true}]},"commitment_options":{"type":"array","description":"Options priced at the line item's quantity, descending discount — same entry shape as the catalog offer-comparison endpoint. Empty for non-reservable SKUs or SKUs without matching offers. For monthly_usage lines, cumulative demand is converted to its average catalog quantity before offer sizing. On the estimate read this is omitted unless include_options=true; the per-line read always includes it.","items":{"$ref":"#/components/schemas/CatalogSKUOfferComparisonEntry"}}},"required":["detail","line_item_id","matched_commitment_option","ondemand_monthly_cost","status"],"additionalProperties":false},"CatalogSKUOfferComparisonEntry":{"type":"object","properties":{"offer_id":{"type":"string","format":"uuid","description":"Commitment offer id."},"offer_org_id":{"type":"string","description":"Owning org of the offer row; with offer_id, the copyable exact-offer reference."},"offer":{"description":"Full offer details (type, region, instance, payment_option, etc).","allOf":[{"$ref":"#/components/schemas/CommitmentOffer"}]},"lease_menu_item_id":{"type":"string","format":"uuid","description":"Lease attached to this candidate, or null for a native (non-Archera) commitment.","nullable":true},"selected_amount":{"type":"number","description":"Commitment amount this candidate would be sized to — unit count for RIs / unit-based CUDs, dollar-per-hour rate for Savings Plans / spend-based CUDs. Match the underlying offer.type to interpret."},"commitment_type":{"type":"string","description":"Commitment type of the underlying offer — equal to offer.type (e.g. 'aws/AmazonEC2', 'aws/savingsplan/Compute', 'azure/Virtual Machines')."},"contract_term":{"description":"Effective commitment term — derived from the lease lockin hours when `lease_menu_item_id` is set (e.g. 'one_year_gris'), else from the offer's own duration (e.g. 'one_year', 'three_year'). The real lock-in period, not the offer's raw duration.","type":"string","enum":["one_year_gris","thirty_day_gris","two_month_gris","three_month_gris","four_month_gris","five_month_gris","six_month_gris","seven_month_gris","eight_month_gris","nine_month_gris","ten_month_gris","eleven_month_gris","twelve_month_gris","thirteen_month_gris","fourteen_month_gris","fifteen_month_gris","sixteen_month_gris","seventeen_month_gris","eighteen_month_gris","nineteen_month_gris","twenty_month_gris","twenty_one_month_gris","twenty_two_month_gris","twenty_three_month_gris","twenty_four_month_gris","twenty_five_month_gris","twenty_six_month_gris","twenty_seven_month_gris","twenty_eight_month_gris","twenty_nine_month_gris","thirty_month_gris","thirty_one_month_gris","thirty_two_month_gris","thirty_three_month_gris","thirty_four_month_gris","thirty_five_month_gris","one_year","two_year","three_year","five_year","zero_day","thirty_day","two_month","three_month","four_month","five_month","six_month","seven_month","eight_month","nine_month","ten_month","eleven_month","thirteen_month","fourteen_month","fifteen_month","sixteen_month","seventeen_month","eighteen_month","nineteen_month","twenty_month","twenty_one_month","twenty_two_month","twenty_three_month","twenty_five_month","twenty_six_month","twenty_seven_month","twenty_eight_month","twenty_nine_month","thirty_month","thirty_one_month","thirty_two_month","thirty_three_month","thirty_four_month","thirty_five_month",null],"nullable":true},"payment_option":{"description":"Payment option (no_upfront / partial_upfront / all_upfront).","type":"string","enum":["no_upfront","partial_upfront","all_upfront",null],"nullable":true},"discount_rate":{"type":"number","description":"Discount rate vs on-demand (0-1)."},"breakeven_days":{"type":"number","description":"Days until this candidate pays for itself; null if undefined.","nullable":true},"commitment_upfront_cost":{"type":"number","description":"One-time dollars at signing for this candidate. NOT a rate — do not sum with monthly-rate fields."},"commitment_financials_monthly_rate":{"description":"Projected economics as 730-hour monthly rates, same shape as line items / plans. `commitment_savings.net` is the headline savings vs running on-demand.","allOf":[{"$ref":"#/components/schemas/CommitmentFinancialsNoRebate"}]}},"required":["breakeven_days","commitment_financials_monthly_rate","commitment_type","commitment_upfront_cost","contract_term","discount_rate","lease_menu_item_id","offer","offer_id","offer_org_id","payment_option","selected_amount"],"additionalProperties":false},"CommitmentOffer":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Offer identifier"},"provider":{"description":"Cloud provider (aws, azure, gcp)","type":"string","enum":["aws","azure","gcp"]},"type":{"type":"string","description":"Commitment type (e.g. 'ri', 'savings_plan', 'cud')"},"region":{"type":"string","description":"Cloud region (e.g. 'us-east-1')","nullable":true},"duration_seconds":{"type":"integer","description":"Total commitment duration in seconds"},"instance_type":{"type":"string","description":"Instance type (e.g. 'm5.xlarge'), null for Savings Plans","nullable":true},"instance_family":{"type":"string","description":"Instance family (e.g. 'm5'), null for some commitment types","nullable":true},"offering_class":{"description":"Offering class (e.g. 'standard', 'convertible')","type":"string","enum":["standard","convertible",null],"nullable":true},"payment_option":{"description":"Payment option (e.g. 'no_upfront', 'partial_upfront', 'all_upfront')","type":"string","enum":["no_upfront","partial_upfront","all_upfront",null],"nullable":true},"plan_type":{"type":"string","description":"Plan type (e.g. 'Compute', 'EC2Instance')","nullable":true},"product_description":{"type":"string","description":"Product description (e.g. 'Linux/UNIX')","nullable":true},"display_name":{"type":"string","description":"Human-readable offer name","nullable":true},"guaranteed_display_name":{"type":"string","description":"Offer name when purchased as an Archera Guaranteed Commitment","nullable":true},"is_flexible":{"type":"boolean","description":"Whether the commitment has instance size flexibility","nullable":true}},"additionalProperties":false},"CommitmentFinancialsNoRebate":{"type":"object","properties":{"commitment_cost":{"$ref":"#/components/schemas/CommitmentCost"},"commitment_savings":{"$ref":"#/components/schemas/CommitmentSavings_Exclude_Rebate"},"covered_ondemand_cost":{"type":"number","description":"On-demand cost of usage covered by commitments — baseline for savings. NOT a cost paid by the user. Equals commitment_cost.breakdown.cloud_provider_cost.total + commitment_savings.gross."}},"additionalProperties":false},"CommitmentCost":{"type":"object","properties":{"total":{"type":"number","description":"Total paid (cloud_provider_cost.total + archera_premium). Headline 'cost'."},"breakdown":{"$ref":"#/components/schemas/CommitmentCostBreakdown"}},"additionalProperties":false},"CommitmentCostBreakdown":{"type":"object","properties":{"cloud_provider_cost":{"$ref":"#/components/schemas/CloudProviderCost"},"archera_premium":{"type":"number","description":"Archera premium — paid to Archera, equal to a portion of the savings Archera generates for this commitment (fee_rate * gross savings, only charged when gross > 0). Already included in commitment_cost.total (don't add on top). Because premium is only a fraction of gross, whenever archera_premium > 0 the commitment is net-positive after the fee. Native (non-Archera) commitments have premium = 0 and offer no such guarantee; an underutilized guaranteed commitment pre-lockin can also show net < 0 (the rebate that covers this kicks in post-lockin)."}},"additionalProperties":false},"CloudProviderCost":{"type":"object","properties":{"total":{"type":"number","description":"Amortized cost paid to the cloud provider. Sums with archera_premium to reach cost.total."},"breakdown":{"description":"Optional. Additive payment-cadence decomposition of total (recurring + amortized_upfront). Present only when purchase-term structure is known (individual commitment or plan).","allOf":[{"$ref":"#/components/schemas/CloudProviderCostBreakdown"}]}},"additionalProperties":false},"CloudProviderCostBreakdown":{"type":"object","properties":{"recurring":{"type":"number","description":"Recurring monthly payment to the cloud provider."},"amortized_upfront":{"type":"number","description":"Monthly share of the upfront payment, amortized over the term."}},"additionalProperties":false},"CommitmentSavings_Exclude_Rebate":{"type":"object","properties":{"net":{"type":"number","description":"Net savings after Archera premium, including any rebate. Actual bill reduction. Headline 'savings'."},"gross":{"type":"number","description":"Savings before Archera premium. Equals covered_ondemand_cost - commitment_cost.breakdown.cloud_provider_cost.total."}},"additionalProperties":false},"CostEstimateTotals":{"type":"object","properties":{"ondemand_monthly_cost":{"type":"number"},"estimated_monthly_cost":{"type":"number","description":"Sum of selected-option cost where selected, else on-demand"},"monthly_net_savings":{"type":"number","description":"ondemand_monthly_cost - estimated_monthly_cost"},"commitment_upfront_cost":{"type":"number","description":"One-time dollars at signing across selected options. NOT a rate — do not sum with monthly-rate fields."}},"required":["commitment_upfront_cost","estimated_monthly_cost","monthly_net_savings","ondemand_monthly_cost"],"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{"nullable":true},"code":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"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},"UpdateCostEstimateArgs":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","nullable":true}},"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"}}}}}}}
```

## Add line items to a cost estimate

> Bulk-adds lines. Catalog refs are resolved against the public catalog plus the org's custom-priced SKUs and must match the estimate's provider; descriptor fields are snapshotted server-side. Duplicate SKUs across line items are allowed — that is how partial coverage is expressed (e.g. 3 committed + 2 on-demand of the same SKU as two line items).

```json
{"openapi":"3.0.2","info":{"title":"Archera.ai Beta API","version":"v1.0.0"},"tags":[{"name":"Cost Estimates (Beta)","description":"Saved cost-estimate baskets — catalog SKUs with quantities, priced live as monthly cost and savings under per-line-item commitment selections."}],"paths":{"/beta/v1/org/{org_id}/cost-estimates/{estimate_id}/line-items":{"post":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostEstimate"}}}},"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"},"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/AddLineItemsArgs"}}}},"tags":["Cost Estimates (Beta)"],"summary":"Add line items to a cost estimate","description":"Bulk-adds lines. Catalog refs are resolved against the public catalog plus the org's custom-priced SKUs and must match the estimate's provider; descriptor fields are snapshotted server-side. Duplicate SKUs across line items are allowed — that is how partial coverage is expressed (e.g. 3 committed + 2 on-demand of the same SKU as two line items)."}}},"components":{"schemas":{"CostEstimate":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"provider":{"description":"Cloud provider (aws, azure, gcp)","type":"string","enum":["aws","azure","gcp"]},"name":{"type":"string"},"description":{"type":"string","nullable":true},"source_draft_id":{"type":"string","format":"uuid","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/CostEstimateLineItem"}},"pricing":{"description":"Computed pricing; null when include_pricing=false","anyOf":[{"$ref":"#/components/schemas/CostEstimatePricing"},{"type":"object","nullable":true}]}},"required":["created_at","description","id","line_items","name","provider","source_draft_id","updated_at"],"additionalProperties":false},"CostEstimateLineItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"catalog_sku":{"$ref":"#/components/schemas/CatalogSKUSummary"},"usage_unit":{"type":"string","nullable":true},"label":{"type":"string","nullable":true},"quantity":{"type":"number"},"quantity_basis":{"type":"string","enum":["resource_count","monthly_usage"]},"is_enabled":{"type":"boolean","description":"False = kept in the basket but excluded from totals and plans"},"selected_commitment_option":{"description":"Persisted selected commitment option, or null for on-demand","anyOf":[{"$ref":"#/components/schemas/CostEstimateSelectedCommitmentOption"},{"type":"object","nullable":true}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["catalog_sku","created_at","id","is_enabled","quantity","quantity_basis","selected_commitment_option","updated_at"],"additionalProperties":false},"CatalogSKUSummary":{"type":"object","properties":{"catalog_sku_org_id":{"type":"string"},"catalog_sku_id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["aws","azure","gcp",null],"nullable":true},"provider_sku_id":{"type":"string","nullable":true},"display_name":{"type":"string","nullable":true},"instance_type":{"type":"string","nullable":true},"service":{"type":"string","nullable":true},"provider_service":{"type":"string","nullable":true},"region_code":{"type":"string","nullable":true},"operating_system":{"type":"string","nullable":true},"database_engine":{"type":"string","nullable":true},"cache_engine":{"type":"string","nullable":true},"usage_type":{"type":"string","nullable":true}},"required":["cache_engine","catalog_sku_id","catalog_sku_org_id","database_engine","display_name","instance_type","operating_system","provider","provider_service","provider_sku_id","region_code","service","usage_type"],"additionalProperties":false},"CostEstimateSelectedCommitmentOption":{"type":"object","properties":{"contract_term":{"type":"string","enum":["one_year_gris","thirty_day_gris","two_month_gris","three_month_gris","four_month_gris","five_month_gris","six_month_gris","seven_month_gris","eight_month_gris","nine_month_gris","ten_month_gris","eleven_month_gris","twelve_month_gris","thirteen_month_gris","fourteen_month_gris","fifteen_month_gris","sixteen_month_gris","seventeen_month_gris","eighteen_month_gris","nineteen_month_gris","twenty_month_gris","twenty_one_month_gris","twenty_two_month_gris","twenty_three_month_gris","twenty_four_month_gris","twenty_five_month_gris","twenty_six_month_gris","twenty_seven_month_gris","twenty_eight_month_gris","twenty_nine_month_gris","thirty_month_gris","thirty_one_month_gris","thirty_two_month_gris","thirty_three_month_gris","thirty_four_month_gris","thirty_five_month_gris","one_year","two_year","three_year","five_year","zero_day","thirty_day","two_month","three_month","four_month","five_month","six_month","seven_month","eight_month","nine_month","ten_month","eleven_month","thirteen_month","fourteen_month","fifteen_month","sixteen_month","seventeen_month","eighteen_month","nineteen_month","twenty_month","twenty_one_month","twenty_two_month","twenty_three_month","twenty_five_month","twenty_six_month","twenty_seven_month","twenty_eight_month","twenty_nine_month","thirty_month","thirty_one_month","thirty_two_month","thirty_three_month","thirty_four_month","thirty_five_month"],"description":"Effective contract term name — the customer lock-in (e.g. 'one_year_gris', 'three_year'). A lease may shorten this relative to the native offer term."},"payment_option":{"default":null,"description":"Payment option of the chosen offer","type":"string","enum":["no_upfront","partial_upfront","all_upfront",null],"nullable":true},"commitment_type":{"type":"string","default":null,"maxLength":255,"description":"Commitment type (e.g. 'aws/savingsplan/Compute') — the comparison entry's `offer.type`, same vocabulary as commitment plan template contract_specs.","nullable":true},"lease_menu_item_id":{"type":"string","format":"uuid","default":null,"description":"Archera lease menu item backing the option. Non-null means the option is Archera-guaranteed; pins which lease backs it when two guaranteed options share a term and payment option.","nullable":true},"offer_org_id":{"type":"string","default":null,"maxLength":50,"description":"With offer_id, the exact-offer pin — copy both from the chosen comparison entry. Optional: the semantic fields alone re-match fine.","nullable":true},"offer_id":{"type":"string","format":"uuid","default":null,"description":"Exact offer pinned at selection time (the comparison entry's offer_id). Refines re-matching to the precise offer — e.g. standard vs convertible RIs at the same term and payment — and is never a pricing source.","nullable":true}},"required":["contract_term"],"additionalProperties":false},"CostEstimatePricing":{"type":"object","properties":{"line_items":{"type":"array","items":{"$ref":"#/components/schemas/CostEstimateLineItemPricing"}},"totals":{"$ref":"#/components/schemas/CostEstimateTotals"}},"required":["line_items","totals"],"additionalProperties":false},"CostEstimateLineItemPricing":{"type":"object","properties":{"line_item_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["ok","not_priceable","pricing_error","selected_option_unavailable"],"description":"'ok' = priced; 'not_priceable' = no positive on-demand price, or the SKU's usage unit changed since the quantity was entered; 'pricing_error' = commitment options could not be computed and the line item counts as on-demand until pricing succeeds; 'selected_option_unavailable' = persisted option no longer matches an offered option — the line item counts as on-demand in totals and the stored option is kept for re-matching later."},"detail":{"type":"string","nullable":true},"ondemand_monthly_cost":{"type":"number","nullable":true},"matched_commitment_option":{"description":"The current catalog option matching the persisted selection, priced at the line item's quantity — same entry shape as the catalog offer-comparison endpoint.","anyOf":[{"$ref":"#/components/schemas/CatalogSKUOfferComparisonEntry"},{"type":"object","nullable":true}]},"commitment_options":{"type":"array","description":"Options priced at the line item's quantity, descending discount — same entry shape as the catalog offer-comparison endpoint. Empty for non-reservable SKUs or SKUs without matching offers. For monthly_usage lines, cumulative demand is converted to its average catalog quantity before offer sizing. On the estimate read this is omitted unless include_options=true; the per-line read always includes it.","items":{"$ref":"#/components/schemas/CatalogSKUOfferComparisonEntry"}}},"required":["detail","line_item_id","matched_commitment_option","ondemand_monthly_cost","status"],"additionalProperties":false},"CatalogSKUOfferComparisonEntry":{"type":"object","properties":{"offer_id":{"type":"string","format":"uuid","description":"Commitment offer id."},"offer_org_id":{"type":"string","description":"Owning org of the offer row; with offer_id, the copyable exact-offer reference."},"offer":{"description":"Full offer details (type, region, instance, payment_option, etc).","allOf":[{"$ref":"#/components/schemas/CommitmentOffer"}]},"lease_menu_item_id":{"type":"string","format":"uuid","description":"Lease attached to this candidate, or null for a native (non-Archera) commitment.","nullable":true},"selected_amount":{"type":"number","description":"Commitment amount this candidate would be sized to — unit count for RIs / unit-based CUDs, dollar-per-hour rate for Savings Plans / spend-based CUDs. Match the underlying offer.type to interpret."},"commitment_type":{"type":"string","description":"Commitment type of the underlying offer — equal to offer.type (e.g. 'aws/AmazonEC2', 'aws/savingsplan/Compute', 'azure/Virtual Machines')."},"contract_term":{"description":"Effective commitment term — derived from the lease lockin hours when `lease_menu_item_id` is set (e.g. 'one_year_gris'), else from the offer's own duration (e.g. 'one_year', 'three_year'). The real lock-in period, not the offer's raw duration.","type":"string","enum":["one_year_gris","thirty_day_gris","two_month_gris","three_month_gris","four_month_gris","five_month_gris","six_month_gris","seven_month_gris","eight_month_gris","nine_month_gris","ten_month_gris","eleven_month_gris","twelve_month_gris","thirteen_month_gris","fourteen_month_gris","fifteen_month_gris","sixteen_month_gris","seventeen_month_gris","eighteen_month_gris","nineteen_month_gris","twenty_month_gris","twenty_one_month_gris","twenty_two_month_gris","twenty_three_month_gris","twenty_four_month_gris","twenty_five_month_gris","twenty_six_month_gris","twenty_seven_month_gris","twenty_eight_month_gris","twenty_nine_month_gris","thirty_month_gris","thirty_one_month_gris","thirty_two_month_gris","thirty_three_month_gris","thirty_four_month_gris","thirty_five_month_gris","one_year","two_year","three_year","five_year","zero_day","thirty_day","two_month","three_month","four_month","five_month","six_month","seven_month","eight_month","nine_month","ten_month","eleven_month","thirteen_month","fourteen_month","fifteen_month","sixteen_month","seventeen_month","eighteen_month","nineteen_month","twenty_month","twenty_one_month","twenty_two_month","twenty_three_month","twenty_five_month","twenty_six_month","twenty_seven_month","twenty_eight_month","twenty_nine_month","thirty_month","thirty_one_month","thirty_two_month","thirty_three_month","thirty_four_month","thirty_five_month",null],"nullable":true},"payment_option":{"description":"Payment option (no_upfront / partial_upfront / all_upfront).","type":"string","enum":["no_upfront","partial_upfront","all_upfront",null],"nullable":true},"discount_rate":{"type":"number","description":"Discount rate vs on-demand (0-1)."},"breakeven_days":{"type":"number","description":"Days until this candidate pays for itself; null if undefined.","nullable":true},"commitment_upfront_cost":{"type":"number","description":"One-time dollars at signing for this candidate. NOT a rate — do not sum with monthly-rate fields."},"commitment_financials_monthly_rate":{"description":"Projected economics as 730-hour monthly rates, same shape as line items / plans. `commitment_savings.net` is the headline savings vs running on-demand.","allOf":[{"$ref":"#/components/schemas/CommitmentFinancialsNoRebate"}]}},"required":["breakeven_days","commitment_financials_monthly_rate","commitment_type","commitment_upfront_cost","contract_term","discount_rate","lease_menu_item_id","offer","offer_id","offer_org_id","payment_option","selected_amount"],"additionalProperties":false},"CommitmentOffer":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Offer identifier"},"provider":{"description":"Cloud provider (aws, azure, gcp)","type":"string","enum":["aws","azure","gcp"]},"type":{"type":"string","description":"Commitment type (e.g. 'ri', 'savings_plan', 'cud')"},"region":{"type":"string","description":"Cloud region (e.g. 'us-east-1')","nullable":true},"duration_seconds":{"type":"integer","description":"Total commitment duration in seconds"},"instance_type":{"type":"string","description":"Instance type (e.g. 'm5.xlarge'), null for Savings Plans","nullable":true},"instance_family":{"type":"string","description":"Instance family (e.g. 'm5'), null for some commitment types","nullable":true},"offering_class":{"description":"Offering class (e.g. 'standard', 'convertible')","type":"string","enum":["standard","convertible",null],"nullable":true},"payment_option":{"description":"Payment option (e.g. 'no_upfront', 'partial_upfront', 'all_upfront')","type":"string","enum":["no_upfront","partial_upfront","all_upfront",null],"nullable":true},"plan_type":{"type":"string","description":"Plan type (e.g. 'Compute', 'EC2Instance')","nullable":true},"product_description":{"type":"string","description":"Product description (e.g. 'Linux/UNIX')","nullable":true},"display_name":{"type":"string","description":"Human-readable offer name","nullable":true},"guaranteed_display_name":{"type":"string","description":"Offer name when purchased as an Archera Guaranteed Commitment","nullable":true},"is_flexible":{"type":"boolean","description":"Whether the commitment has instance size flexibility","nullable":true}},"additionalProperties":false},"CommitmentFinancialsNoRebate":{"type":"object","properties":{"commitment_cost":{"$ref":"#/components/schemas/CommitmentCost"},"commitment_savings":{"$ref":"#/components/schemas/CommitmentSavings_Exclude_Rebate"},"covered_ondemand_cost":{"type":"number","description":"On-demand cost of usage covered by commitments — baseline for savings. NOT a cost paid by the user. Equals commitment_cost.breakdown.cloud_provider_cost.total + commitment_savings.gross."}},"additionalProperties":false},"CommitmentCost":{"type":"object","properties":{"total":{"type":"number","description":"Total paid (cloud_provider_cost.total + archera_premium). Headline 'cost'."},"breakdown":{"$ref":"#/components/schemas/CommitmentCostBreakdown"}},"additionalProperties":false},"CommitmentCostBreakdown":{"type":"object","properties":{"cloud_provider_cost":{"$ref":"#/components/schemas/CloudProviderCost"},"archera_premium":{"type":"number","description":"Archera premium — paid to Archera, equal to a portion of the savings Archera generates for this commitment (fee_rate * gross savings, only charged when gross > 0). Already included in commitment_cost.total (don't add on top). Because premium is only a fraction of gross, whenever archera_premium > 0 the commitment is net-positive after the fee. Native (non-Archera) commitments have premium = 0 and offer no such guarantee; an underutilized guaranteed commitment pre-lockin can also show net < 0 (the rebate that covers this kicks in post-lockin)."}},"additionalProperties":false},"CloudProviderCost":{"type":"object","properties":{"total":{"type":"number","description":"Amortized cost paid to the cloud provider. Sums with archera_premium to reach cost.total."},"breakdown":{"description":"Optional. Additive payment-cadence decomposition of total (recurring + amortized_upfront). Present only when purchase-term structure is known (individual commitment or plan).","allOf":[{"$ref":"#/components/schemas/CloudProviderCostBreakdown"}]}},"additionalProperties":false},"CloudProviderCostBreakdown":{"type":"object","properties":{"recurring":{"type":"number","description":"Recurring monthly payment to the cloud provider."},"amortized_upfront":{"type":"number","description":"Monthly share of the upfront payment, amortized over the term."}},"additionalProperties":false},"CommitmentSavings_Exclude_Rebate":{"type":"object","properties":{"net":{"type":"number","description":"Net savings after Archera premium, including any rebate. Actual bill reduction. Headline 'savings'."},"gross":{"type":"number","description":"Savings before Archera premium. Equals covered_ondemand_cost - commitment_cost.breakdown.cloud_provider_cost.total."}},"additionalProperties":false},"CostEstimateTotals":{"type":"object","properties":{"ondemand_monthly_cost":{"type":"number"},"estimated_monthly_cost":{"type":"number","description":"Sum of selected-option cost where selected, else on-demand"},"monthly_net_savings":{"type":"number","description":"ondemand_monthly_cost - estimated_monthly_cost"},"commitment_upfront_cost":{"type":"number","description":"One-time dollars at signing across selected options. NOT a rate — do not sum with monthly-rate fields."}},"required":["commitment_upfront_cost","estimated_monthly_cost","monthly_net_savings","ondemand_monthly_cost"],"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{"nullable":true},"code":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"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},"AddLineItemsArgs":{"type":"object","properties":{"line_items":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/CostEstimateLineItemInput"}}},"required":["line_items"],"additionalProperties":false},"CostEstimateLineItemInput":{"type":"object","properties":{"catalog_sku_id":{"type":"string","format":"uuid","description":"Catalog SKU id (from the catalog endpoints)"},"catalog_sku_org_id":{"type":"string","default":null,"description":"Optional owning org of the catalog SKU. Usually omitted: bare ids resolve against the public catalog plus your org's custom-priced SKUs, with a custom SKU winning an id collision (same behavior as the catalog offer-comparison endpoint).","nullable":true},"quantity":{"type":"number","minimum":"0","description":"Positive quantity, interpreted per quantity_basis"},"quantity_basis":{"description":"'resource_count' = a whole continuously provisioned quantity held 24/7 (instances, nodes, or whole capacity amounts like 8 GiB / 100 RCUs); 'monthly_usage' = cumulative usage over the month in the SKU's usage unit — also the form for fractional provisioned capacity (2.5 GiB held all month = 2.5 x 730 = 1825 GiBy.h, never quantity 2.5)","type":"string","enum":["resource_count","monthly_usage"]},"label":{"type":"string","default":null,"maxLength":255,"description":"Optional nickname for the line item (e.g. 'web tier')","nullable":true},"is_enabled":{"type":"boolean","default":true,"description":"False keeps the line item in the basket (still priced per line) but excludes it from totals and plan generation (what-if toggle)."},"selected_commitment_option":{"default":null,"description":"Optional selected commitment option; omit or null for on-demand","anyOf":[{"$ref":"#/components/schemas/CostEstimateSelectedCommitmentOption"},{"type":"object","nullable":true}]}},"required":["catalog_sku_id","quantity","quantity_basis"],"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"}}}}}}}
```

## Get one line item's computed pricing

> Returns a persisted line item together with its freshly computed full commitment option grid — the drill-in read for choosing an option. \`line\_item\` carries the quantity and persisted selection descriptor; \`pricing\` carries on-demand monthly cost, options at that quantity, and the re-matched selected option. Pricing is line-local — a line item's cost never depends on sibling line items (usage tiers apply within a line item, matching how the estimate totals are built).

```json
{"openapi":"3.0.2","info":{"title":"Archera.ai Beta API","version":"v1.0.0"},"tags":[{"name":"Cost Estimates (Beta)","description":"Saved cost-estimate baskets — catalog SKUs with quantities, priced live as monthly cost and savings under per-line-item commitment selections."}],"paths":{"/beta/v1/org/{org_id}/cost-estimates/{estimate_id}/line-items/{line_item_id}":{"get":{"parameters":[{"in":"query","name":"payment_options","description":"Payment options to include in commitment option grids","schema":{"type":"array","minItems":1,"items":{"type":"string","enum":["no_upfront","partial_upfront","all_upfront"]}},"required":false,"explode":true,"style":"form"},{"in":"query","name":"only_most_flexible_commitment_type","description":"True limits each SKU's options to its most flexible commitment type. Default false: the calculator compares every applicable type.","schema":{"type":"boolean","default":false},"required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostEstimateLineItemPricingResponse"}}}},"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"},"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"}},"tags":["Cost Estimates (Beta)"],"summary":"Get one line item's computed pricing","description":"Returns a persisted line item together with its freshly computed full commitment option grid — the drill-in read for choosing an option. `line_item` carries the quantity and persisted selection descriptor; `pricing` carries on-demand monthly cost, options at that quantity, and the re-matched selected option. Pricing is line-local — a line item's cost never depends on sibling line items (usage tiers apply within a line item, matching how the estimate totals are built)."}}},"components":{"schemas":{"CostEstimateLineItemPricingResponse":{"type":"object","properties":{"line_item":{"$ref":"#/components/schemas/CostEstimateLineItem"},"pricing":{"$ref":"#/components/schemas/CostEstimateLineItemPricing"}},"required":["line_item","pricing"],"additionalProperties":false},"CostEstimateLineItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"catalog_sku":{"$ref":"#/components/schemas/CatalogSKUSummary"},"usage_unit":{"type":"string","nullable":true},"label":{"type":"string","nullable":true},"quantity":{"type":"number"},"quantity_basis":{"type":"string","enum":["resource_count","monthly_usage"]},"is_enabled":{"type":"boolean","description":"False = kept in the basket but excluded from totals and plans"},"selected_commitment_option":{"description":"Persisted selected commitment option, or null for on-demand","anyOf":[{"$ref":"#/components/schemas/CostEstimateSelectedCommitmentOption"},{"type":"object","nullable":true}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["catalog_sku","created_at","id","is_enabled","quantity","quantity_basis","selected_commitment_option","updated_at"],"additionalProperties":false},"CatalogSKUSummary":{"type":"object","properties":{"catalog_sku_org_id":{"type":"string"},"catalog_sku_id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["aws","azure","gcp",null],"nullable":true},"provider_sku_id":{"type":"string","nullable":true},"display_name":{"type":"string","nullable":true},"instance_type":{"type":"string","nullable":true},"service":{"type":"string","nullable":true},"provider_service":{"type":"string","nullable":true},"region_code":{"type":"string","nullable":true},"operating_system":{"type":"string","nullable":true},"database_engine":{"type":"string","nullable":true},"cache_engine":{"type":"string","nullable":true},"usage_type":{"type":"string","nullable":true}},"required":["cache_engine","catalog_sku_id","catalog_sku_org_id","database_engine","display_name","instance_type","operating_system","provider","provider_service","provider_sku_id","region_code","service","usage_type"],"additionalProperties":false},"CostEstimateSelectedCommitmentOption":{"type":"object","properties":{"contract_term":{"type":"string","enum":["one_year_gris","thirty_day_gris","two_month_gris","three_month_gris","four_month_gris","five_month_gris","six_month_gris","seven_month_gris","eight_month_gris","nine_month_gris","ten_month_gris","eleven_month_gris","twelve_month_gris","thirteen_month_gris","fourteen_month_gris","fifteen_month_gris","sixteen_month_gris","seventeen_month_gris","eighteen_month_gris","nineteen_month_gris","twenty_month_gris","twenty_one_month_gris","twenty_two_month_gris","twenty_three_month_gris","twenty_four_month_gris","twenty_five_month_gris","twenty_six_month_gris","twenty_seven_month_gris","twenty_eight_month_gris","twenty_nine_month_gris","thirty_month_gris","thirty_one_month_gris","thirty_two_month_gris","thirty_three_month_gris","thirty_four_month_gris","thirty_five_month_gris","one_year","two_year","three_year","five_year","zero_day","thirty_day","two_month","three_month","four_month","five_month","six_month","seven_month","eight_month","nine_month","ten_month","eleven_month","thirteen_month","fourteen_month","fifteen_month","sixteen_month","seventeen_month","eighteen_month","nineteen_month","twenty_month","twenty_one_month","twenty_two_month","twenty_three_month","twenty_five_month","twenty_six_month","twenty_seven_month","twenty_eight_month","twenty_nine_month","thirty_month","thirty_one_month","thirty_two_month","thirty_three_month","thirty_four_month","thirty_five_month"],"description":"Effective contract term name — the customer lock-in (e.g. 'one_year_gris', 'three_year'). A lease may shorten this relative to the native offer term."},"payment_option":{"default":null,"description":"Payment option of the chosen offer","type":"string","enum":["no_upfront","partial_upfront","all_upfront",null],"nullable":true},"commitment_type":{"type":"string","default":null,"maxLength":255,"description":"Commitment type (e.g. 'aws/savingsplan/Compute') — the comparison entry's `offer.type`, same vocabulary as commitment plan template contract_specs.","nullable":true},"lease_menu_item_id":{"type":"string","format":"uuid","default":null,"description":"Archera lease menu item backing the option. Non-null means the option is Archera-guaranteed; pins which lease backs it when two guaranteed options share a term and payment option.","nullable":true},"offer_org_id":{"type":"string","default":null,"maxLength":50,"description":"With offer_id, the exact-offer pin — copy both from the chosen comparison entry. Optional: the semantic fields alone re-match fine.","nullable":true},"offer_id":{"type":"string","format":"uuid","default":null,"description":"Exact offer pinned at selection time (the comparison entry's offer_id). Refines re-matching to the precise offer — e.g. standard vs convertible RIs at the same term and payment — and is never a pricing source.","nullable":true}},"required":["contract_term"],"additionalProperties":false},"CostEstimateLineItemPricing":{"type":"object","properties":{"line_item_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["ok","not_priceable","pricing_error","selected_option_unavailable"],"description":"'ok' = priced; 'not_priceable' = no positive on-demand price, or the SKU's usage unit changed since the quantity was entered; 'pricing_error' = commitment options could not be computed and the line item counts as on-demand until pricing succeeds; 'selected_option_unavailable' = persisted option no longer matches an offered option — the line item counts as on-demand in totals and the stored option is kept for re-matching later."},"detail":{"type":"string","nullable":true},"ondemand_monthly_cost":{"type":"number","nullable":true},"matched_commitment_option":{"description":"The current catalog option matching the persisted selection, priced at the line item's quantity — same entry shape as the catalog offer-comparison endpoint.","anyOf":[{"$ref":"#/components/schemas/CatalogSKUOfferComparisonEntry"},{"type":"object","nullable":true}]},"commitment_options":{"type":"array","description":"Options priced at the line item's quantity, descending discount — same entry shape as the catalog offer-comparison endpoint. Empty for non-reservable SKUs or SKUs without matching offers. For monthly_usage lines, cumulative demand is converted to its average catalog quantity before offer sizing. On the estimate read this is omitted unless include_options=true; the per-line read always includes it.","items":{"$ref":"#/components/schemas/CatalogSKUOfferComparisonEntry"}}},"required":["detail","line_item_id","matched_commitment_option","ondemand_monthly_cost","status"],"additionalProperties":false},"CatalogSKUOfferComparisonEntry":{"type":"object","properties":{"offer_id":{"type":"string","format":"uuid","description":"Commitment offer id."},"offer_org_id":{"type":"string","description":"Owning org of the offer row; with offer_id, the copyable exact-offer reference."},"offer":{"description":"Full offer details (type, region, instance, payment_option, etc).","allOf":[{"$ref":"#/components/schemas/CommitmentOffer"}]},"lease_menu_item_id":{"type":"string","format":"uuid","description":"Lease attached to this candidate, or null for a native (non-Archera) commitment.","nullable":true},"selected_amount":{"type":"number","description":"Commitment amount this candidate would be sized to — unit count for RIs / unit-based CUDs, dollar-per-hour rate for Savings Plans / spend-based CUDs. Match the underlying offer.type to interpret."},"commitment_type":{"type":"string","description":"Commitment type of the underlying offer — equal to offer.type (e.g. 'aws/AmazonEC2', 'aws/savingsplan/Compute', 'azure/Virtual Machines')."},"contract_term":{"description":"Effective commitment term — derived from the lease lockin hours when `lease_menu_item_id` is set (e.g. 'one_year_gris'), else from the offer's own duration (e.g. 'one_year', 'three_year'). The real lock-in period, not the offer's raw duration.","type":"string","enum":["one_year_gris","thirty_day_gris","two_month_gris","three_month_gris","four_month_gris","five_month_gris","six_month_gris","seven_month_gris","eight_month_gris","nine_month_gris","ten_month_gris","eleven_month_gris","twelve_month_gris","thirteen_month_gris","fourteen_month_gris","fifteen_month_gris","sixteen_month_gris","seventeen_month_gris","eighteen_month_gris","nineteen_month_gris","twenty_month_gris","twenty_one_month_gris","twenty_two_month_gris","twenty_three_month_gris","twenty_four_month_gris","twenty_five_month_gris","twenty_six_month_gris","twenty_seven_month_gris","twenty_eight_month_gris","twenty_nine_month_gris","thirty_month_gris","thirty_one_month_gris","thirty_two_month_gris","thirty_three_month_gris","thirty_four_month_gris","thirty_five_month_gris","one_year","two_year","three_year","five_year","zero_day","thirty_day","two_month","three_month","four_month","five_month","six_month","seven_month","eight_month","nine_month","ten_month","eleven_month","thirteen_month","fourteen_month","fifteen_month","sixteen_month","seventeen_month","eighteen_month","nineteen_month","twenty_month","twenty_one_month","twenty_two_month","twenty_three_month","twenty_five_month","twenty_six_month","twenty_seven_month","twenty_eight_month","twenty_nine_month","thirty_month","thirty_one_month","thirty_two_month","thirty_three_month","thirty_four_month","thirty_five_month",null],"nullable":true},"payment_option":{"description":"Payment option (no_upfront / partial_upfront / all_upfront).","type":"string","enum":["no_upfront","partial_upfront","all_upfront",null],"nullable":true},"discount_rate":{"type":"number","description":"Discount rate vs on-demand (0-1)."},"breakeven_days":{"type":"number","description":"Days until this candidate pays for itself; null if undefined.","nullable":true},"commitment_upfront_cost":{"type":"number","description":"One-time dollars at signing for this candidate. NOT a rate — do not sum with monthly-rate fields."},"commitment_financials_monthly_rate":{"description":"Projected economics as 730-hour monthly rates, same shape as line items / plans. `commitment_savings.net` is the headline savings vs running on-demand.","allOf":[{"$ref":"#/components/schemas/CommitmentFinancialsNoRebate"}]}},"required":["breakeven_days","commitment_financials_monthly_rate","commitment_type","commitment_upfront_cost","contract_term","discount_rate","lease_menu_item_id","offer","offer_id","offer_org_id","payment_option","selected_amount"],"additionalProperties":false},"CommitmentOffer":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Offer identifier"},"provider":{"description":"Cloud provider (aws, azure, gcp)","type":"string","enum":["aws","azure","gcp"]},"type":{"type":"string","description":"Commitment type (e.g. 'ri', 'savings_plan', 'cud')"},"region":{"type":"string","description":"Cloud region (e.g. 'us-east-1')","nullable":true},"duration_seconds":{"type":"integer","description":"Total commitment duration in seconds"},"instance_type":{"type":"string","description":"Instance type (e.g. 'm5.xlarge'), null for Savings Plans","nullable":true},"instance_family":{"type":"string","description":"Instance family (e.g. 'm5'), null for some commitment types","nullable":true},"offering_class":{"description":"Offering class (e.g. 'standard', 'convertible')","type":"string","enum":["standard","convertible",null],"nullable":true},"payment_option":{"description":"Payment option (e.g. 'no_upfront', 'partial_upfront', 'all_upfront')","type":"string","enum":["no_upfront","partial_upfront","all_upfront",null],"nullable":true},"plan_type":{"type":"string","description":"Plan type (e.g. 'Compute', 'EC2Instance')","nullable":true},"product_description":{"type":"string","description":"Product description (e.g. 'Linux/UNIX')","nullable":true},"display_name":{"type":"string","description":"Human-readable offer name","nullable":true},"guaranteed_display_name":{"type":"string","description":"Offer name when purchased as an Archera Guaranteed Commitment","nullable":true},"is_flexible":{"type":"boolean","description":"Whether the commitment has instance size flexibility","nullable":true}},"additionalProperties":false},"CommitmentFinancialsNoRebate":{"type":"object","properties":{"commitment_cost":{"$ref":"#/components/schemas/CommitmentCost"},"commitment_savings":{"$ref":"#/components/schemas/CommitmentSavings_Exclude_Rebate"},"covered_ondemand_cost":{"type":"number","description":"On-demand cost of usage covered by commitments — baseline for savings. NOT a cost paid by the user. Equals commitment_cost.breakdown.cloud_provider_cost.total + commitment_savings.gross."}},"additionalProperties":false},"CommitmentCost":{"type":"object","properties":{"total":{"type":"number","description":"Total paid (cloud_provider_cost.total + archera_premium). Headline 'cost'."},"breakdown":{"$ref":"#/components/schemas/CommitmentCostBreakdown"}},"additionalProperties":false},"CommitmentCostBreakdown":{"type":"object","properties":{"cloud_provider_cost":{"$ref":"#/components/schemas/CloudProviderCost"},"archera_premium":{"type":"number","description":"Archera premium — paid to Archera, equal to a portion of the savings Archera generates for this commitment (fee_rate * gross savings, only charged when gross > 0). Already included in commitment_cost.total (don't add on top). Because premium is only a fraction of gross, whenever archera_premium > 0 the commitment is net-positive after the fee. Native (non-Archera) commitments have premium = 0 and offer no such guarantee; an underutilized guaranteed commitment pre-lockin can also show net < 0 (the rebate that covers this kicks in post-lockin)."}},"additionalProperties":false},"CloudProviderCost":{"type":"object","properties":{"total":{"type":"number","description":"Amortized cost paid to the cloud provider. Sums with archera_premium to reach cost.total."},"breakdown":{"description":"Optional. Additive payment-cadence decomposition of total (recurring + amortized_upfront). Present only when purchase-term structure is known (individual commitment or plan).","allOf":[{"$ref":"#/components/schemas/CloudProviderCostBreakdown"}]}},"additionalProperties":false},"CloudProviderCostBreakdown":{"type":"object","properties":{"recurring":{"type":"number","description":"Recurring monthly payment to the cloud provider."},"amortized_upfront":{"type":"number","description":"Monthly share of the upfront payment, amortized over the term."}},"additionalProperties":false},"CommitmentSavings_Exclude_Rebate":{"type":"object","properties":{"net":{"type":"number","description":"Net savings after Archera premium, including any rebate. Actual bill reduction. Headline 'savings'."},"gross":{"type":"number","description":"Savings before Archera premium. Equals covered_ondemand_cost - commitment_cost.breakdown.cloud_provider_cost.total."}},"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{"nullable":true},"code":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"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}},"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"}}}}}}}
```

## Remove a line item

> Removes the line from the estimate.

```json
{"openapi":"3.0.2","info":{"title":"Archera.ai Beta API","version":"v1.0.0"},"tags":[{"name":"Cost Estimates (Beta)","description":"Saved cost-estimate baskets — catalog SKUs with quantities, priced live as monthly cost and savings under per-line-item commitment selections."}],"paths":{"/beta/v1/org/{org_id}/cost-estimates/{estimate_id}/line-items/{line_item_id}":{"delete":{"responses":{"204":{"description":"No Content"},"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"},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"tags":["Cost Estimates (Beta)"],"summary":"Remove a line item","description":"Removes the line from the estimate."}}},"components":{"schemas":{"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{"nullable":true},"code":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"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}},"responses":{"DEFAULT_ERROR":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}
```

## Update a line item

> Merge-semantic update of quantity, quantity\_basis, label, is\_enabled, and the selected commitment option. Changing \`quantity\_basis\` reinterprets the number, so it requires \`quantity\` in the same request. Pass \`selected\_commitment\_option: null\` to revert the line to on-demand. To choose an option, copy from a \`commitment\_options\` entry: \`commitment\_type\`, \`contract\_term\`, \`payment\_option\`, \`lease\_menu\_item\_id\`, \`offer\_id\`, and \`offer\_org\_id\`.

```json
{"openapi":"3.0.2","info":{"title":"Archera.ai Beta API","version":"v1.0.0"},"tags":[{"name":"Cost Estimates (Beta)","description":"Saved cost-estimate baskets — catalog SKUs with quantities, priced live as monthly cost and savings under per-line-item commitment selections."}],"paths":{"/beta/v1/org/{org_id}/cost-estimates/{estimate_id}/line-items/{line_item_id}":{"patch":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostEstimateLineItem"}}}},"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"},"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/UpdateLineItemArgs"}}}},"tags":["Cost Estimates (Beta)"],"summary":"Update a line item","description":"Merge-semantic update of quantity, quantity_basis, label, is_enabled, and the selected commitment option. Changing `quantity_basis` reinterprets the number, so it requires `quantity` in the same request. Pass `selected_commitment_option: null` to revert the line to on-demand. To choose an option, copy from a `commitment_options` entry: `commitment_type`, `contract_term`, `payment_option`, `lease_menu_item_id`, `offer_id`, and `offer_org_id`."}}},"components":{"schemas":{"CostEstimateLineItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"catalog_sku":{"$ref":"#/components/schemas/CatalogSKUSummary"},"usage_unit":{"type":"string","nullable":true},"label":{"type":"string","nullable":true},"quantity":{"type":"number"},"quantity_basis":{"type":"string","enum":["resource_count","monthly_usage"]},"is_enabled":{"type":"boolean","description":"False = kept in the basket but excluded from totals and plans"},"selected_commitment_option":{"description":"Persisted selected commitment option, or null for on-demand","anyOf":[{"$ref":"#/components/schemas/CostEstimateSelectedCommitmentOption"},{"type":"object","nullable":true}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["catalog_sku","created_at","id","is_enabled","quantity","quantity_basis","selected_commitment_option","updated_at"],"additionalProperties":false},"CatalogSKUSummary":{"type":"object","properties":{"catalog_sku_org_id":{"type":"string"},"catalog_sku_id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["aws","azure","gcp",null],"nullable":true},"provider_sku_id":{"type":"string","nullable":true},"display_name":{"type":"string","nullable":true},"instance_type":{"type":"string","nullable":true},"service":{"type":"string","nullable":true},"provider_service":{"type":"string","nullable":true},"region_code":{"type":"string","nullable":true},"operating_system":{"type":"string","nullable":true},"database_engine":{"type":"string","nullable":true},"cache_engine":{"type":"string","nullable":true},"usage_type":{"type":"string","nullable":true}},"required":["cache_engine","catalog_sku_id","catalog_sku_org_id","database_engine","display_name","instance_type","operating_system","provider","provider_service","provider_sku_id","region_code","service","usage_type"],"additionalProperties":false},"CostEstimateSelectedCommitmentOption":{"type":"object","properties":{"contract_term":{"type":"string","enum":["one_year_gris","thirty_day_gris","two_month_gris","three_month_gris","four_month_gris","five_month_gris","six_month_gris","seven_month_gris","eight_month_gris","nine_month_gris","ten_month_gris","eleven_month_gris","twelve_month_gris","thirteen_month_gris","fourteen_month_gris","fifteen_month_gris","sixteen_month_gris","seventeen_month_gris","eighteen_month_gris","nineteen_month_gris","twenty_month_gris","twenty_one_month_gris","twenty_two_month_gris","twenty_three_month_gris","twenty_four_month_gris","twenty_five_month_gris","twenty_six_month_gris","twenty_seven_month_gris","twenty_eight_month_gris","twenty_nine_month_gris","thirty_month_gris","thirty_one_month_gris","thirty_two_month_gris","thirty_three_month_gris","thirty_four_month_gris","thirty_five_month_gris","one_year","two_year","three_year","five_year","zero_day","thirty_day","two_month","three_month","four_month","five_month","six_month","seven_month","eight_month","nine_month","ten_month","eleven_month","thirteen_month","fourteen_month","fifteen_month","sixteen_month","seventeen_month","eighteen_month","nineteen_month","twenty_month","twenty_one_month","twenty_two_month","twenty_three_month","twenty_five_month","twenty_six_month","twenty_seven_month","twenty_eight_month","twenty_nine_month","thirty_month","thirty_one_month","thirty_two_month","thirty_three_month","thirty_four_month","thirty_five_month"],"description":"Effective contract term name — the customer lock-in (e.g. 'one_year_gris', 'three_year'). A lease may shorten this relative to the native offer term."},"payment_option":{"default":null,"description":"Payment option of the chosen offer","type":"string","enum":["no_upfront","partial_upfront","all_upfront",null],"nullable":true},"commitment_type":{"type":"string","default":null,"maxLength":255,"description":"Commitment type (e.g. 'aws/savingsplan/Compute') — the comparison entry's `offer.type`, same vocabulary as commitment plan template contract_specs.","nullable":true},"lease_menu_item_id":{"type":"string","format":"uuid","default":null,"description":"Archera lease menu item backing the option. Non-null means the option is Archera-guaranteed; pins which lease backs it when two guaranteed options share a term and payment option.","nullable":true},"offer_org_id":{"type":"string","default":null,"maxLength":50,"description":"With offer_id, the exact-offer pin — copy both from the chosen comparison entry. Optional: the semantic fields alone re-match fine.","nullable":true},"offer_id":{"type":"string","format":"uuid","default":null,"description":"Exact offer pinned at selection time (the comparison entry's offer_id). Refines re-matching to the precise offer — e.g. standard vs convertible RIs at the same term and payment — and is never a pricing source.","nullable":true}},"required":["contract_term"],"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{"nullable":true},"code":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"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},"UpdateLineItemArgs":{"type":"object","properties":{"quantity":{"type":"number","minimum":"0"},"quantity_basis":{"type":"string","enum":["resource_count","monthly_usage"]},"label":{"type":"string","maxLength":255,"nullable":true},"is_enabled":{"type":"boolean","description":"False keeps the line item in the basket (still priced per line) but excludes it from totals and plan generation (what-if toggle)."},"selected_commitment_option":{"anyOf":[{"type":"object","nullable":true},{"$ref":"#/components/schemas/CostEstimateSelectedCommitmentOption"}]}},"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"}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.archera.ai/api-reference/beta-api/cost-estimates-beta.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
