# Aggregate usageRecordReports

`GET https://api.suger.cloud/org/{orgId}/usageRecordReport/aggregate`

Aggregate usageRecordReports by date and dimension key.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orgId` | path | string | yes | Organization ID |
| `partner` | query | string | yes | Cloud Partner |
| `granularity` | query | string | yes | Granularity |
| `startDate` | query | string | yes | Start date (UTC) in YYYY-MM-DD format |
| `endDate` | query | string | yes | End date (UTC) in YYYY-MM-DD format |

## Responses

### 200 — List of aggregated usage reports

Content-Type: `application/json`

**`UsageRecordAggregated`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `date` | string | no |  |
| `dimensionKey` | string | no |  |
| `quantity` | number | no |  |

### 400 — Bad request error

Content-Type: `application/json`

### 500 — Internal server error

Content-Type: `application/json`

## Example

_Generated from this operation's schema. Values are placeholders — substitute your own ids, and set `SUGER_TOKEN` to a bearer token from the [OAuth client-credentials exchange](https://doc.fours.com/settings/oauth-app/)._

### Request

```bash
curl -X GET 'https://api.suger.cloud/org/{orgId}/usageRecordReport/aggregate?partner={partner}&granularity={granularity}&startDate={startDate}&endDate={endDate}' \
  -H "Authorization: Bearer $SUGER_TOKEN"
```

### Response — 200

```json
[
  {
    "date": "2026-01-31T12:00:00Z",
    "dimensionKey": "string",
    "quantity": 100
  }
]
```

### Error — 400

```json
"string"
```

---

API reference: https://doc.fours.com/api/
