Reports

Get Data Usage Report

GET /residential/data-usage-report

Returns a data usage report as a CSV file for the given residential user or sub-user. The hash must belong to the authenticated caller's account. An empty date range returns a CSV with headers only.

Query Parameters

Name
Type
Description

hash

String

The app_hash of the residential user or sub-user to generate the report for

date_from

String

Start date of the report range in Y-m-d format

date_to

String

End date of the report range in Y-m-d format. Must be on or after date_from

measurement_unit

String

Unit for traffic values. One of: B, KB, MB, GB

rounding_decimal

Integer

Number of decimal places for traffic values (must be 0 or greater)

time_zone

String

Optional. IANA timezone name used to bucket traffic by date (e.g. Europe/London, America/New_York, UTC). Case-insensitive. When omitted, the default timezone is used

All parameters except time_zone are required.

Example request:

curl -X GET "https://resi-api.iproyal.com/v1/residential/data-usage-report?hash=asd48w4f5c1s2a5w4f8h5t6r1v&date_from=2026-01-01&date_to=2026-01-31&measurement_unit=GB&rounding_decimal=2" \
    -H "Authorization: Bearer <your_api_token>" \
    -o data-usage-report.csv

Response

The endpoint returns a CSV file as an attachment.

Response headers:

Example response:

Last updated

Was this helpful?