# Commitment portfolio ledger

> One row per commitment across every connected account, resolving the account that holds it against the accounts that consume it, with the expiry instant, the utilization trend, and what a renewal protects kept separate from what right-sizing would save.

Source: https://docs.levelfour.ai/api-reference/commitments/get-commitments-portfolio


## GET /api/v1/commitments/portfolio

One row per commitment across every connected account, resolving the account that holds it against the accounts that consume it, with the expiry instant, the utilization trend, and what a renewal protects kept separate from what right-sizing would save.

### Authentication

Send `Authorization: Bearer <token>`.

### Parameters

- `provider` (query, string, default `aws`)
- `basis` (query, string, default `net`)

### Responses

#### 200: Successful Response

- `success` (boolean, default `true`)
- `timestamp` (date-time string)
- `data` (object, required)
  - `basis` (one of `list`, `net`, required)
  - `totals` (object, required)
    - `commitment_count` (integer, required)
    - `hourly_commitment_usd` (number, required)
    - `fee_monthly_list` (number, required)
    - `fee_monthly_net` (number, required)
    - `protects_monthly` (number, required)
    - `rightsizing_monthly` (number, required)
    - `expiring_within_30d` (integer, required)
    - `organization_count` (integer, required)
  - `rows` (array of object, required)
    - `id` (string, required)
    - `service` (string, required)
    - `service_label` (string, required)
    - `kind` (one of `reserved_instance`, `savings_plan`, `committed_use_discount`, `spend_commitment`, required)
    - `holder_account_id` (string, required)
    - `holder_account_name` (string, required)
    - `consumers` (array of object, required)
      - `account_id` (string, required)
      - `account_name` (string, required)
      - `covered_spend_monthly` (number, required)
      - `covered_hours` (number, required)
    - `organization_id` (string, required)
    - `region` (string, required)
    - `applies_to` (string, nullable, required)
    - `unit_count` (integer, required)
    - `unit_rate_hourly` (number, nullable, required)
    - `hourly_commitment_usd` (number, nullable, required)
    - `fee_monthly_list` (number, nullable, required)
    - `fee_monthly_net` (number, nullable, required)
    - `end_at` (string, nullable, required)
    - `expires_in_seconds` (integer, nullable, required)
    - `utilization_pct` (number, required)
    - `coverage_pct` (number, required)
    - `utilization_slope_pp_30d` (number, nullable, required)
    - `saturated` (boolean, required)
    - `protects_monthly` (number, nullable, required)
    - `rightsizing_monthly` (number, nullable, required)
    - `exchangeable` (boolean, nullable, required)
    - `cancellable` (boolean, nullable, required)
    - `predecessor_id` (string, nullable, required)
    - `status` (one of `active`, `expiring`, `expired`, `cancelled`, required)

#### Errors

- `400`: Bad Request
- `401`: Authentication Error
- `403`: Authorization Error
- `404`: Not Found
- `409`: Conflict
- `422`: Validation Error
- `429`: Rate Limit Exceeded
- `500`: Internal Server Error

Body of `400`, `401`, `403`, `404`, `409`, `422`, `429`, `500`:

- `success` (`false`, required)
- `error` (object, required)
  - `code` (string, required)
  - `message` (string, required)
  - `details` (any)
- `timestamp` (date-time string, required)
