---
title: "A customer's bandwidth history"
method: GET
path: "/api/v1/usage"
tags: ["Reseller API: act as your customers"]
---

# A customer's bandwidth history

`GET /api/v1/usage`

## Request

- Base URL: `https://hproxy.com`
- URL: `https://hproxy.com/api/v1/usage`
- Auth: API key in header `X-API-Key`

With `X-Reseller-Customer-Id`, the named customer's traffic from the meter: one row per day and one per plan over the last `days` days (1 to 365, default 30). `gbUsed` is what was consumed that day; `null` means no reading exists for that day (a plan's first day, or a gap) and is never zero, and `unknownDays` counts those. Each day also carries `gbTotal` (the caps of the plans measured that day) and `gbLeft` (what they still held at the day's last reading), so how much a customer had and how much is left is a history, not a snapshot. Each plan line carries its cap, the meter at the last reading (`gbUsedEnd`) and `gbLeft`. Narrow to one plan with `plan_id`. What they bought is on [`GET /orders`](/docs/proxy-api/orders); this is what they used. Readings land every 30 minutes, one pass after the plan's own figures are synced, so a plan bought in the last hour may have no row yet; for a live figure read the plan itself (`GET /plans/{id}`).

## Query parameters

- `days` integer
- `plan_id` string

## Response `200`

Success

- object

## Other responses

- `400`: Invalid input. The body names the field and the accepted set.
- `401`: Missing or invalid API key.
- `429`: Rate limited. Retry after the delay in the response.

---

[API](https://skmtc.dev/hproxy/apis/hproxy-api.md) · [All operations](https://skmtc.dev/hproxy/apis/hproxy-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hproxy/apis/hproxy-api/revisions/9f6898fe76e2?raw)
