Reseller API: act as your customers

A customer's bandwidth history

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; 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}).

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

Query parameters

daysinteger

Window in days, 1 to 365. Default 30.

plan_idstring

One plan only.

Response

Success

object required

Changes

No recorded changes to this operation across all 1 revision of this API.