# Purchase Commitments

Use the Archera Partner API to programmatically purchase cloud commitments for your customers.

**Prerequisites**:

* Partner API key and partner organization ID
* Customer organization must be onboarded with cloud integration complete
* Customer billing data must be synced (typically 24-48 hours after onboarding)

**Base URL:** `https://api.archera.ai/v2`

**Authentication:** Include `x-api-key: YOUR_PARTNER_API_KEY` header in all requests.

***

### ​Step 1: Get default commitment plans <a href="#step-1-get-default-commitment-plans" id="step-1-get-default-commitment-plans"></a>

Retrieve Archera’s recommended commitment plans for the customer:

```shellscript
curl -H 'x-api-key: YOUR_PARTNER_API_KEY' \
  https://api.archera.ai/v2/org/{child_org_id}/partners/plans/default
```

**Response includes:**

* Recommended commitment amounts
* Projected savings
* Breakeven analysis
* Risk metrics
* Plan configurations

Review the plans to identify which commitment strategy works best for your customer.

***

### ​Step 2: Purchase a commitment plan <a href="#step-2-purchase-a-commitment-plan" id="step-2-purchase-a-commitment-plan"></a>

Execute the purchase for a specific plan:

```shellscript
curl -X POST \
  -H 'x-api-key: YOUR_PARTNER_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "plan_id": "plan_abc123",
    "confirm": true
  }' \
  https://api.archera.ai/v2/org/{child_org_id}/partners/plans/purchase
```

**Parameters:**

* `plan_id` - ID from the default plans response
* `confirm` - Set to `true` to execute the purchase

The API will execute the commitment purchase in the customer’s cloud account.

***

### ​What the API Enables <a href="#what-the-api-enables" id="what-the-api-enables"></a>

The Partner API provides:

* **Archera recommendations** for optimal commitment purchases based on usage patterns
* **Programmatic purchasing** without navigating cloud provider consoles
* **Automated optimization** that continuously finds savings opportunities
* **White-label capabilities** to embed in your platform

***

### ​Use Cases <a href="#use-cases" id="use-cases"></a>

By integrating commitment purchasing into your platform, you can:

* Deliver enterprise-grade cloud cost optimization as a native feature
* Create new revenue streams while keeping customers in your ecosystem
* Automate savings recommendations and execution on a schedule
* Build dashboards showing ROI and lifetime savings to customers

<br>


---

# Agent Instructions: 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:

```
GET https://docs.archera.ai/help-center/archera-embedded/purchase-commitments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
