# 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>
