# Get Tenant Consumption Summary by Tenant

> POST endpoint for retrieving the consumption summary for a specific tenant, with breakdown by tenant-pool and organization-pool usage.

Use this endpoint to retrieve the consumption summary for a specific tenant in your organization.

## API endpoint

`POST` `{accessURL}/lease_/api/usage/{organizationId}/tenants/{tenantId}/consumption-summary`

Replace `{accessURL}` in all endpoint paths with the base URL for your cloud platform:

| Cloud platform | Access URL |
| --- | --- |
| Test Cloud | `https://cloud.uipath.com/` |
| Test Cloud Public Sector | `https://govcloud.uipath.us/` |
| Test Cloud Dedicated | `https://{customURL}.dedicated.uipath.com/` |

## Request headers

```
--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
```

:::note
To obtain the `{access_token}`, make sure to authenticate through the ROPC method described [here](https://docs.uipath.com/test-cloud/automation-cloud/latest/api-guide/authentication-methods#authentication-methods).
:::

## Path parameters

| Path param | Data type | Description |
| --- | --- | --- |
| `organizationId` (required) | String (GUID) | The ID of the organization in which your tenant resides. |
| `tenantId` (required) | String (GUID) | The ID of the tenant for which to retrieve the consumption summary. |

## Request body

The request body specifies the date range and the consumable code for which to retrieve the summary. The tenant is determined by the `{tenantId}` path parameter.
For a detailed list of consumable codes, refer to [Consumables](https://docs.uipath.com/test-cloud/automation-cloud/latest/api-guide/license-codes#consumables).

```json
{
  "startDate": 0,
  "endDate": 0,
  "consumableCode": "string"
}
```

:::note
`startDate` and `endDate` are Unix timestamps in milliseconds.
:::

## Responses

### 200 OK

Returns the consumption summary for the specified tenant.

## Example request

The call should resemble the following example (cURL):

```
curl --location --request POST 'https://cloud.uipath.com/lease_/api/usage/11111111-1111-1111-1111-111111111111/tenants/22222222-2222-2222-2222-222222222222/consumption-summary' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
  "startDate": 1704067200000,
  "endDate": 1706745600000,
  "consumableCode": "consumption_unit_code"
}'
```

Here's the response body for a successful consumption summary retrieval:

:::note
  `consumedFromOrgWithoutTenant` reflects consumption that occurs at the organization level without tenant context — it is not attributed to any specific tenant.
:::

```json
{
  "consumedFromOrgWithoutTenant": 0,
  "tenantConsumptionItems": [
    {
      "tenantId": "string",
      "consumedFromTenantPool": 0,
      "consumedFromOrgPool": 0
    }
  ]
}
```
