purchase commitments.md

Purchase Commitments

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

Prerequisites:

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

Retrieve Archera’s recommended commitment plans for the customer:

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

Response includes:

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


​Step 2: Purchase a commitment plan

Execute the purchase for a specific plan:

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:

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


​What the API Enables

The Partner API provides:


​Use Cases

By integrating commitment purchasing into your platform, you can: