Daily Usage
Retrieve usage for a specific date, either for all connections under a parent or corporate account, or for a single connection (SIM) in an account.
urn:grt:gemmapplication/jsonhttps://gemmapi2.granitenet.com/v2/api/gemm/v1Uses and Requirements
Use this API to retrieve usage data for a specific calendar date. It has two variants:
- Account-level — returns usage for all connections under the given parent or corporate account (or child account) for the specified date.
- SIM-level — returns usage for a single connection (identified by ICCID) for the specified date.
Access: This API is available only to API users, and it must be enabled for your organization. Requests return 403 until it is enabled.
This API is synchronous and sends no callback. Because the account-level variant can return many connections for a date, it returns one page at a time. Send pageNumber and pageSize in the request; the response returns pageCount so you can request the next pages. If you omit them, the API returns the first page of 25 records.
date is a required parameter on both variants.
| Variant | Method | Path |
|---|---|---|
| All connections for an account | GET | /accounts/{accountNumber}/usage/daily |
| Single connection (SIM) | GET | /accounts/{accountNumber}/sims/{iccid}/usage/daily |
HTTP Status Codes
Account usage
| Status | When |
|---|---|
200 | The request succeeded. Usage for every connection under the account on the given date is returned one page at a time; if none match, records is empty and recordCount is 0. |
400 | date is missing, not in MM/dd/yyyy format or a future date (Eastern Time); accountNumber is not an 8-digit number; pageNumber is less than 1 or pageSize is outside 1 to 100; pageNumber or pageSize is not a whole number; or the macnum header is missing or not an 8-digit number. |
401 | The bearer token is missing, invalid or expired, or you do not have access to the account in the macnum header. |
403 | The Daily Usage API is not enabled for your organization, accountNumber does not belong to the hierarchy of the macnum header, or your credentials are not enabled for API access. |
429 | Too many requests were sent in a short period. Wait briefly and retry. |
500 | An unexpected server error occurred. |
503 | The system is under scheduled maintenance. Retry after the maintenance window. |
504 | A dependent service did not respond in time. Retry the request. |
SIM usage
| Status | When |
|---|---|
200 | The request succeeded. The single usage record for the connection on the given date is returned. |
400 | date is missing, not in MM/dd/yyyy format or a future date (Eastern Time); accountNumber is not an 8-digit number; the ICCID or EID in the path is not 19-20 digits (an F is allowed as the 20th character) or 32 digits; or the macnum header is missing or not an 8-digit number. |
401 | The bearer token is missing, invalid or expired, or you do not have access to the account in the macnum header. |
403 | The Daily Usage API is not enabled for your organization, accountNumber does not belong to the hierarchy of the macnum header, or your credentials are not enabled for API access. |
404 | No usage record was found for the connection under accountNumber on the given date. This status is also returned if the usage lookup fails on our side. |
429 | Too many requests were sent in a short period. Wait briefly and retry. |
500 | An unexpected server error occurred. |
503 | The system is under scheduled maintenance. Retry after the maintenance window. |
504 | A dependent service did not respond in time. Retry the request. |
Headers
| Header | Value |
|---|---|
Authorization | Bearer access-token |
Content-Type | application/json |
macnum | Top Level Account Number associated with your API credentials. |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
accountNumber | string | Yes | The account number (parent or corporate) to retrieve daily usage for. Must be an 8-digit numeric value, including any leading zeros. The account must belong to the hierarchy of the account passed in the macnum header; otherwise the request is rejected with 403. |
iccid | string | Yes | The ICCID or EID of the SIM to retrieve daily usage for. SIM-level variant only. An ICCID is 19 or 20 numeric digits (an F is allowed as the 20th character); an EID is 32 numeric digits. |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
date | string | Yes | The date to retrieve usage for, in MM/dd/yyyy format with leading zeros, for example 05/14/2026 (5/14/2026 is rejected). The date is evaluated in Eastern Time (EST). Today's date is allowed; a future date is rejected. |
pageNumber | number | No | Account-level variant only. The page to retrieve; must be 1 or greater. Default: 1. The first response returns pageCount inside pagingInformation, which tells you how many pages are available. Increment pageNumber on each call to fetch the next page. |
pageSize | number | No | Account-level variant only. The number of records to retrieve in a single API call; must be between 1 and 100. Default and recommended value: 25. |
The SIM-level variant ignores pageNumber and pageSize and always returns a single record.
Request Examples
Responses
Success Response (200 OK)
The records array is shortened to three entries here for readability; a real page contains up to pageSize entries. When no connections match, the API still returns 200, with an empty records array and a recordCount of 0.
Response Fields
The account-level variant returns a records array plus pagingInformation. The SIM-level variant returns a single record, with the same fields as a records entry at the top level and no records or pagingInformation wrapper.
| Parameter | Type | Description |
|---|---|---|
records | array | Account-level variant only. One entry per connection. Every connection on the account's plans for the billing cycle of the requested date is returned, not only those with usage. |
connection | string | The ICCID of the connection. For a connection with no ICCID on file, the IMEI is returned instead, or the phone number (BTN) if there is no IMEI either. |
cycleDay | integer | The day number of the requested date within the billing cycle. |
dailyUsage | number | Domestic data usage for the requested date, in GB. Returns 0 when no usage was recorded for the connection on that date. |
deviceId | string | The device identifier (IMEI) associated with the connection. An empty string when not known. |
usageDate | string | The requested date, echoed back in MM/dd/yyyy format. |
pagingInformation | object | Account-level variant only. Paging details for the result set. |
pageNumber | integer | The page returned. |
pageSize | integer | The page size used for the request. |
pageCount | integer | Total number of pages available for the given criteria. |
recordCount | integer | Total number of connections across all pages. |
Failure Responses
Error Message
| Status | When | Error message |
|---|---|---|
400 | date is missing or is a future date. | UsageDate: Date is required and cannot be a future date. |
400 | date is not in MM/dd/yyyy format. | UsageDate: Date must be in MM/dd/yyyy format. |
400 | accountNumber is not an 8-digit numeric value. | Macnum: {accountNumber}: Macnum should be an 8-digit numeric value. |
400 | iccid is not in a valid format (SIM-level), or pageNumber / pageSize is out of range (account-level). | A validation message naming the invalid parameter. |
401 | The bearer token is missing, invalid or expired, or you do not have access to the account in the macnum header. | Token failure: "Unauthorized access. Please provide a valid token." This body uses PascalCase keys (Result, Errors, ErrorCode: Unauthorized). No access to the macnum account: a standard problem-details body with status 401. |
403 | accountNumber does not belong to the hierarchy of the macnum header. | Provided macnum: {accountNumber} does not belong to {macnum}. |
403 | The API is not enabled for your organization. | Feature SimDataUsageDailyProgressExternalApi is not enabled for {user email}. |
404 | SIM-level variant only: the ICCID does not resolve to a connection under the given account for that date. The account-level variant never returns 404; it returns an empty records array instead. | No details found for connection {iccid} |
Error Response Fields
| Parameter | Type | Description |
|---|---|---|
result | object | Result status object. |
status | string | Result status: success or failure. |
errors | object | List of errors. |
errorCode | string | Error code. |
errorMessage | string | Error message. |