> 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/exchanges-beta.md).

# Exchanges (Beta)

Agent-friendly commitment exchange endpoints

## Get Azure exchange recommendations

> Returns Azure reservation exchange recommendations from two sources: plan-derived exchanges that use a commitment plan as the purchase side, and non-plan-derived exchanges that replace eligible 1-year native reservations with same-SKU 1-year GRI purchases backed by 3-year offers. Plan-derived recommendations use either explicit commitments or detected underutilized commitments as the return side. Currently only provider=azure is supported. When plan\_id is omitted, the endpoint prefers the latest calculated 'Recommended RIs Only' default plan for the provider-resources segment (a twin of the Recommended plan without savings plans, which cannot be exchanged), falling back to the same Recommended default plan as GET /commitment-plans/recommended when that plan does not exist yet. Returned-commitment utilization and financials use a fixed 3-day lookback. Explicit commitments without DailyUtilization rows in that lookback are excluded.

```json
{"openapi":"3.0.2","info":{"title":"Archera.ai Beta API","version":"v1.0.0"},"tags":[{"name":"Exchanges (Beta)","description":"Agent-friendly commitment exchange endpoints"}],"paths":{"/beta/v1/org/{org_id}/exchanges/recommendations":{"get":{"parameters":[{"in":"query","name":"provider","description":"Cloud provider (aws, azure, gcp)","schema":{"type":"string","enum":["aws","azure","gcp"]},"required":true},{"in":"query","name":"plan_id","description":"Optional commitment plan ID to use for plan-derived exchange purchases. When omitted, the endpoint prefers the latest calculated 'Recommended RIs Only' default plan for the provider-resources segment — a twin of the Recommended plan without savings plans, which cannot be exchanged — falling back to the same Recommended default plan selected by GET /commitment-plans/recommended when that plan does not exist yet. Responses may also include non-plan-derived native-to-GRI exchanges.","schema":{"type":"string","format":"uuid","default":null,"nullable":true},"required":false},{"in":"query","name":"commitment_ids","description":"Optional explicit Azure commitment IDs to consider returning. When omitted, the exchanger detects underutilized exchange candidates from the default 3-day DailyUtilization lookback. Explicit commitments without utilization rows in that lookback are excluded. Mutually exclusive with plan_id.","schema":{"type":"array","default":null,"items":{"type":"string","format":"uuid"},"nullable":true},"required":false,"explode":true,"style":"form"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeRecommendationsResponse"}}}},"204":{"description":"No Content"},"400":{"description":"Bad Request"},"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":["Exchanges (Beta)"],"summary":"Get Azure exchange recommendations","description":"Returns Azure reservation exchange recommendations from two sources: plan-derived exchanges that use a commitment plan as the purchase side, and non-plan-derived exchanges that replace eligible 1-year native reservations with same-SKU 1-year GRI purchases backed by 3-year offers. Plan-derived recommendations use either explicit commitments or detected underutilized commitments as the return side. Currently only provider=azure is supported. When plan_id is omitted, the endpoint prefers the latest calculated 'Recommended RIs Only' default plan for the provider-resources segment (a twin of the Recommended plan without savings plans, which cannot be exchanged), falling back to the same Recommended default plan as GET /commitment-plans/recommended when that plan does not exist yet. Returned-commitment utilization and financials use a fixed 3-day lookback. Explicit commitments without DailyUtilization rows in that lookback are excluded."}}},"components":{"schemas":{"ExchangeRecommendationsResponse":{"type":"object","properties":{"current_utilization_lookback_days":{"type":"integer","description":"Number of trailing days of DailyUtilization used for returned-commitment utilization and financials."},"data":{"type":"array","description":"Azure exchange recommendations.","items":{"$ref":"#/components/schemas/ExchangeRecommendation"}}},"required":["current_utilization_lookback_days","data"],"additionalProperties":false},"ExchangeRecommendation":{"type":"object","properties":{"purchase_lifetime_commitment":{"type":"number","description":"Lifetime Azure commitment value of the purchase side."},"returned_lifetime_commitment":{"type":"number","description":"Lifetime Azure commitment value returned by the exchange."},"additional_lifetime_commitment":{"type":"number","description":"Purchase lifetime commitment minus returned lifetime commitment. Azure exchange policy requires this to be non-negative."},"purchase":{"$ref":"#/components/schemas/ExchangePurchase"},"returns":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeReturn"}},"purchase_commitment_financials_monthly_rate":{"description":"Purchase-side monthly-rate financials.","allOf":[{"$ref":"#/components/schemas/CommitmentFinancialsNoRebate"}]},"returned_commitment_financials_monthly_rate":{"description":"Returned commitments' rolled-up monthly-rate financials for the selected integer return quantities. Cost comes from DailyUtilization commitment cost, and savings are computed after assigning as much utilization as possible to the quantity that remains committed. Rebate and Archera premium are excluded from exchange recommendations and are not included in net savings.","allOf":[{"$ref":"#/components/schemas/CommitmentFinancialsNoRebate"}]},"returned_commitment_daily_utilizations":{"type":"array","description":"Daily whole-commitment utilization for the returned commitments, dollar weighted by each return's commitment cost. Use this for exchange-level utilization charts.","items":{"$ref":"#/components/schemas/ExchangeReturnedCommitmentDailyUtilization"}},"reason":{"type":"string","description":"Short human-readable reason this exchange was recommended, based on how the exchanger generated it.","nullable":true},"delta_vs_returned":{"description":"Purchase-side economics compared with returned-commitment economics. Monthly fields are purchase-side minus returned-side; purchase_upfront_cost is purchase-side one-time upfront only and is not netted. Purchase financials come from plan-amortized line item financials; returned financials come from DailyUtilization cost and covered usage for the selected integer return quantities, normalized to 730-hour monthly rates.","allOf":[{"$ref":"#/components/schemas/ExchangeRecommendationDelta"}]}},"required":["additional_lifetime_commitment","delta_vs_returned","purchase","purchase_commitment_financials_monthly_rate","purchase_lifetime_commitment","returned_commitment_daily_utilizations","returned_commitment_financials_monthly_rate","returned_lifetime_commitment","returns"],"additionalProperties":false},"ExchangePurchase":{"type":"object","properties":{"account_id":{"type":"string","description":"Target cloud account/subscription for the purchase.","nullable":true},"contract_term":{"description":"User-facing purchase commitment term. For leased/guaranteed purchases this is the lease lock-in term; for native purchases it is the offer 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},"lease_menu_item_id":{"type":"string","format":"uuid","description":"Lease menu item attached to the purchase side, or null for native purchases.","nullable":true},"quantity":{"type":"integer","description":"Quantity of the Azure reservation to purchase."},"offer":{"description":"Azure reservation offer being purchased.","allOf":[{"$ref":"#/components/schemas/CommitmentOffer"}]},"commitment_upfront_cost":{"type":"number","description":"One-time upfront dollars required at signing for the purchase side. NOT a monthly rate."},"commitment_financials_monthly_rate":{"description":"Purchase-side plan line item economics as 730-hour monthly rates.","allOf":[{"$ref":"#/components/schemas/CommitmentFinancialsNoRebate"}]}},"required":["commitment_financials_monthly_rate","commitment_upfront_cost","offer","quantity"],"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},"ExchangeReturn":{"type":"object","properties":{"commitment":{"description":"Azure commitment proposed to return in the exchange.","allOf":[{"$ref":"#/components/schemas/Commitment"}]},"quantity":{"type":"integer","description":"Quantity of this commitment proposed for return."},"remaining_lifetime_commitment":{"type":"number","description":"Remaining Azure commitment value returned for this commitment quantity. This is lifetime exchange value, not a monthly rate."},"utilization":{"type":"number","description":"Whole-commitment utilization of the returned commitment over the DailyUtilization period (0-1)."},"underutilized_commitment_cost":{"type":"number","description":"Estimated underutilized commitment cost over the DailyUtilization period. This is a period total, not a monthly rate."},"utilization_days":{"type":"integer","description":"Number of DailyUtilization days behind the utilization fields."},"reservation_resource_id":{"type":"string","description":"Azure reservation resource ID required by Azure exchange APIs."},"commitment_financials_monthly_rate":{"description":"Returned commitment economics as a 730-hour monthly rate for the selected integer return quantity. Cost comes from DailyUtilization commitment cost for the response period, scaled to the returned quantity. Savings are computed after assigning as much utilization as possible to the quantity that remains committed, so returned fully-utilized quantities can have positive savings and underutilized quantities have negative savings. Archera premium and rebate are excluded from exchange recommendations and are not included in net savings.","allOf":[{"$ref":"#/components/schemas/CommitmentFinancialsNoRebate"}]}},"required":["commitment","commitment_financials_monthly_rate","quantity","remaining_lifetime_commitment","reservation_resource_id","underutilized_commitment_cost","utilization","utilization_days"],"additionalProperties":false},"Commitment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique commitment identifier"},"provider_reservation_id":{"type":"string","description":"Cloud provider's ID for this commitment (e.g. AWS reservation ID)"},"provider":{"description":"Cloud provider (aws, azure, gcp)","type":"string","enum":["aws","azure","gcp"]},"display_name":{"type":"string","description":"Human-readable commitment name"},"guaranteed_display_name":{"type":"string","description":"Commitment name when held as an Archera Guaranteed Commitment"},"type":{"type":"string","description":"Commitment type (e.g. 'Compute', 'EC2Instance', 'RDS')"},"status":{"description":"Commitment status (e.g. 'active', 'expired', 'queued')","type":"string","enum":["active","locked","new","reselling","unlocked","unknown","cancelled","expired","recently_expired","resold","removed"]},"is_active":{"type":"boolean","description":"Whether the commitment is currently active"},"is_archera_guaranteed":{"type":"boolean","description":"Whether this is an Archera Guaranteed Commitment"},"account_id":{"type":"string","description":"Cloud account ID this commitment is in","nullable":true},"billing_account_id":{"type":"string","description":"Billing/management account ID","nullable":true},"start_date":{"type":"string","format":"date-time","description":"When the commitment started","nullable":true},"end_date":{"type":"string","format":"date-time","description":"When the commitment expires","nullable":true},"duration_seconds":{"type":"integer","description":"Total commitment duration in seconds","nullable":true},"guarantee_start":{"type":"string","format":"date-time","description":"When the Archera guarantee period started","nullable":true},"guarantee_lockin_date":{"type":"string","format":"date-time","description":"When the Archera guarantee lock-in period ends","nullable":true},"guarantee_method":{"readOnly":true,"description":"How the Archera guarantee is delivered. 'rebate': Archera rebates the cost of the unused commitment directly to the user (as cash or credit toward Archera premiums). 'release': Archera takes over the commitment along with remaining payment obligations. Null for non-guaranteed commitments."},"region":{"type":"string","description":"Cloud region (e.g. 'us-east-1')","nullable":true},"instance_type":{"type":"string","description":"Instance type (e.g. 'm5.xlarge')","nullable":true},"instance_family":{"type":"string","description":"Instance family (e.g. 'm5')","nullable":true},"plan_type":{"type":"string","description":"Plan type (e.g. 'Compute', 'EC2Instance')","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},"offering_class":{"description":"Offering class (e.g. 'standard', 'convertible')","type":"string","enum":["standard","convertible",null],"nullable":true},"is_flexible":{"type":"boolean","description":"Whether the commitment has instance size flexibility","nullable":true},"instance_count":{"type":"integer","description":"Number of instances covered","nullable":true},"contract_term":{"description":"Contract term (e.g. 'thirty_day_gris', 'one_year')","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}},"required":["id","provider"],"additionalProperties":false},"ExchangeReturnedCommitmentDailyUtilization":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"DailyUtilization date."},"utilization":{"type":"number","description":"Whole-commitment utilization of the returned commitments for this date (0-1), dollar weighted by each return's commitment cost."}},"required":["date","utilization"],"additionalProperties":false},"ExchangeRecommendationDelta":{"type":"object","properties":{"monthly_net_savings":{"type":"number","description":"Purchase monthly net savings minus returned commitments' monthly net savings. Positive means the exchange purchase saves more per 730-hour month."},"monthly_commitment_cost":{"type":"number","description":"Purchase monthly commitment cost minus returned commitments' monthly commitment cost. Positive means more monthly commitment spend."},"purchase_upfront_cost":{"type":"number","description":"Purchase-side one-time upfront cost only. Not netted against returned commitments because returned financials are monthly-rate utilization actuals and have no upfront component. NOT a rate."}},"required":["monthly_commitment_cost","monthly_net_savings","purchase_upfront_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"}}}}}}}
```

## Apply Azure exchange recommendations

> Requests application of one Azure reservation exchange recommendation. The request body must contain the exact purchase-side offers and return-side commitments from the recommendation the user approved. Currently only provider=azure is supported.

```json
{"openapi":"3.0.2","info":{"title":"Archera.ai Beta API","version":"v1.0.0"},"tags":[{"name":"Exchanges (Beta)","description":"Agent-friendly commitment exchange endpoints"}],"paths":{"/beta/v1/org/{org_id}/exchanges/recommendations/apply":{"post":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyExchangeRecommendationsResponse"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"$ref":"#/components/responses/UNPROCESSABLE_CONTENT"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyExchangeRecommendationsArgs"}}}},"tags":["Exchanges (Beta)"],"summary":"Apply Azure exchange recommendations","description":"Requests application of one Azure reservation exchange recommendation. The request body must contain the exact purchase-side offers and return-side commitments from the recommendation the user approved. Currently only provider=azure is supported."}}},"components":{"schemas":{"ApplyExchangeRecommendationsResponse":{"type":"object","properties":{"status":{"type":"string","description":"Application status for the exchange recommendations."},"recommendation_count":{"type":"integer","description":"Number of exchange recommendations applied."}},"required":["recommendation_count","status"],"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},"ApplyExchangeRecommendationsArgs":{"type":"object","properties":{"provider":{"description":"Cloud provider (aws, azure, gcp)","type":"string","enum":["aws","azure","gcp"]},"purchases":{"type":"array","minItems":1,"description":"Explicit purchase-side line items for one exchange recommendation.","items":{"$ref":"#/components/schemas/ApplyExchangePurchase"}},"returns":{"type":"array","minItems":1,"description":"Explicit return-side line items for one exchange recommendation.","items":{"$ref":"#/components/schemas/ApplyExchangeReturn"}}},"required":["provider","purchases","returns"],"additionalProperties":false},"ApplyExchangePurchase":{"type":"object","properties":{"offer_id":{"type":"string","format":"uuid","description":"Azure reservation offer ID to purchase."},"quantity":{"type":"integer","minimum":1,"description":"Quantity of this offer to purchase."}},"required":["offer_id","quantity"],"additionalProperties":false},"ApplyExchangeReturn":{"type":"object","properties":{"commitment_id":{"type":"string","format":"uuid","description":"Existing Azure commitment ID to return."},"quantity":{"type":"integer","minimum":1,"description":"Quantity of this commitment to return."}},"required":["commitment_id","quantity"],"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/exchanges-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.
