> For the complete documentation index, see [llms.txt](https://docs.licensespring.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.licensespring.com/consumption-pools/management-api-reference.md).

# Management API Reference

This page is a quick reference for the pool-related Management API endpoints. All endpoints are scoped to your company and follow the standard authentication, pagination (`limit` / `offset`), and `order_by` conventions.

Read operations require `licenses_read`. Write operations require `licenses_write`.

For full parameter tables and request/response schemas, refer to the [Management API documentation](https://docs.licensespring.com/management-api).

### Pools

Base path: `/api/v1/consumption-pools/`

<table data-search="false"><thead><tr><th>Action</th><th>Method and Path</th><th>Notes</th></tr></thead><tbody><tr><td>List</td><td><code>GET /consumption-pools/</code></td><td>Filters: <code>customer_account</code>, <code>type</code>, <code>name__icontains</code></td></tr><tr><td>Retrieve</td><td><code>GET /consumption-pools/{id}/</code></td><td>Includes the read-only aggregates <code>held_total</code> and <code>member_count</code></td></tr><tr><td>Create</td><td><code>POST /consumption-pools/</code></td><td><code>code</code> must be unique per customer account</td></tr><tr><td>Update</td><td><code>PATCH /consumption-pools/{id}/</code></td><td><code>code</code> and <code>type</code> are immutable Changes are rejected</td></tr><tr><td>Delete</td><td><code>DELETE /consumption-pools/{id}/</code></td><td>Unlinks all members without modifying their counters</td></tr><tr><td>Reset</td><td><code>POST /consumption-pools/{id}/reset/</code></td><td>Zeroes the pool balance and every member's contribution counter</td></tr><tr><td>Members</td><td><code>GET /consumption-pools/{id}/members/</code></td><td>Paginated rows with <code>id</code> and <code>held</code> (offline units currently held per member). Filter: <code>id__in</code></td></tr></tbody></table>

{% hint style="info" %}
`held_total` and `member_count` are computed aggregates available only on the retrieve endpoint, they are not included in list responses. Fetch a pool by ID when you need these values.

`held_total` is the sum of `checked_out − consumed − returned` across all of the pool's checkout rows. Settled checkouts contribute zero.
{% endhint %}

### Linking and Unlinking Members

Pool membership is a field on the member resource, not a separate join resource:

* **License:** `PATCH /api/v1/licenses/{id}/` with `{"consumption_pool": <pool_id>}` to link, or `{"consumption_pool": null}` to unlink.
* **Feature:** `PATCH /api/v1/license-product-features/{id}/` with the same field.

Mismatched types or accounts are rejected with `invalid_pool_type`. Both list endpoints support `consumption_pool` as a filter parameter, so you can retrieve all members of a pool with their full fields:

```
GET /api/v1/licenses/?consumption_pool=<id>
GET /api/v1/license-product-features/?consumption_pool=<id>
```

{% hint style="warning" %}
Reducing a pooled feature's `total_consumptions` via `PATCH` returns the difference to the pool, the same behavior as a manual member reset through the platform.
{% endhint %}

### Offline Checkouts (Read-Only)

| Endpoint                                                  | Contents                                                     |
| --------------------------------------------------------- | ------------------------------------------------------------ |
| `GET /api/v1/consumption-pool-license-checkouts/`         | One row per device reservation on a license pool             |
| `GET /api/v1/consumption-pool-license-feature-checkouts/` | One row per device and feature reservation on a feature pool |

**Fields per row:** `checked_out`, `consumed`, `returned`, `synced_at` (null while the checkout is open), plus references to the pool, license (and feature, for feature pools), and device.

**Available filters:** `consumption_pool`, `license` / `license_product_feature`, `device`, and `synced_at__isnull` pass `true` to retrieve only open reservations, or `false` for settled ones.

### Activity and Analytics

| Endpoint                                          | Actions                     | Primary Filters                                                                                                      |
| ------------------------------------------------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `/api/v1/consumption-pools-hourly/`               | list, aggregate, export     | `ts__*`, `consumption_pool(__in)`, `customer_account(__in)`, `action(__in)`                                          |
| `/api/v1/consumption-pools-daily/`                | list, aggregate             | `date__*` and the same dimension filters                                                                             |
| `/api/v1/license-consumption-activities/`         | list, hourly, daily, export | `ts__*`, `license__in`, `customer_account(__in)`, `consumption_pool(__in)`, `consumption_pool__isnull`, `action__in` |
| `/api/v1/license-feature-consumption-activities/` | same actions                | `license_feature__in` in place of `license__in`                                                                      |

The `aggregate` action accepts a `group_by` parameter, a comma-separated combination of `consumption_pool`, `customer_account`, `company`, and `action` and returns consumption sums per time bucket per group. Passing an invalid key returns `400` with the list of accepted values.

**Exports:** A `GET` request streams the results as CSV. A `POST` request queues a background export job and returns `{job_id}` this requires the reporting data export feature on your plan.

{% hint style="info" %}
Analytics endpoints remain accessible even if Consumption Pools is later removed from your plan. Historical data generated while the feature was active stays readable through the API.
{% endhint %}

All numeric consumption fields respect the `Number.MAX_SAFE_INTEGER` bound enforced across the LicenseSpring API. See the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) for the exact value.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.licensespring.com/consumption-pools/management-api-reference.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
