---
title: "Aggregate usage event quantities by UTC day for a property."
method: GET
path: "/v2/events/aggregate/daily"
tags: ["Events"]
---

# Aggregate usage event quantities by UTC day for a property.

`GET /v2/events/aggregate/daily`

Returns every UTC calendar day intersecting the requested half-open range. Days without matching events have an empty data array.

## Query parameters

- `property` string, required
- `value` string, required
- `aggregation` 'sum' | 'min' | 'max' | 'avg' | 'latest' | 'count' — Aggregation applied to corrected usage events. latest returns the quantity from the event with the latest occurred_at; ties use accepted_at then event ID. count returns the number of events.
- `start_at` integer, required — Unix timestamp in seconds.
- `end_at` integer, required — Unix timestamp in seconds.
- `currency` string

## Response `200`

Metric usage for every UTC day in the requested range.

- DailyPropertyUsage
  - `property` string, required
  - `value` string, required
  - `aggregation` 'sum' | 'min' | 'max' | 'avg' | 'latest' | 'count', required — Aggregation applied to corrected usage events. latest returns the quantity from the event with the latest occurred_at; ties use accepted_at then event ID. count returns the number of events.
  - `data` DailyMetricUsage[], required
    - `period_start_at` integer, required — Unix timestamp in seconds.
    - `data` MetricQuantity[], required — Matching metric aggregates. Empty when the day has no matching events.
      - `metric_id` string, required — LedgerUp metric identifier, or the lowercase currency code for currency usage.
      - `currency` string, nullable, required — Lowercase currency code for currency usage. Null for normal metric usage.
      - `quantity` string, required — Aggregated decimal quantity serialized as a string.

## Other responses

- `400` — Bad request, invalid header, invalid amount/quantity/currency, or text validation failure.
- `401` — Missing or invalid API key.
- `403` — API key lacks the required permission, or reset was attempted outside the test namespace.
- `408` — Request exceeded the 30 second timeout.
- `429` — Rate limit exceeded.
- `500` — Internal server error or queue failure.

---

[API](https://skmtc.dev/ledgerup/apis/ledgerup-api.md) · [All operations](https://skmtc.dev/ledgerup/apis/ledgerup-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ledgerup/ledgerup-api/revisions/be257191807b/schema)
