Skip to Content
GEMMUsage & ReportingDaily Usage API

Daily Usage

GET/accounts/{accountNumber}/usage/dailyUsage & ReportingOpenAPI
GET/accounts/{accountNumber}/sims/{iccid}/usage/dailyUsage & ReportingOpenAPI

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.

Auth Scope
urn:grt:gemm
Content-Type
application/json
Base URL
https://gemmapi2.granitenet.com/v2/api/gemm/v1

Uses 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.

VariantMethodPath
All connections for an accountGET/accounts/{accountNumber}/usage/daily
Single connection (SIM)GET/accounts/{accountNumber}/sims/{iccid}/usage/daily

HTTP Status Codes

Account usage

StatusWhen
200The 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.
400date 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.
401The bearer token is missing, invalid or expired, or you do not have access to the account in the macnum header.
403The 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.
429Too many requests were sent in a short period. Wait briefly and retry.
500An unexpected server error occurred.
503The system is under scheduled maintenance. Retry after the maintenance window.
504A dependent service did not respond in time. Retry the request.

SIM usage

StatusWhen
200The request succeeded. The single usage record for the connection on the given date is returned.
400date 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.
401The bearer token is missing, invalid or expired, or you do not have access to the account in the macnum header.
403The 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.
404No 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.
429Too many requests were sent in a short period. Wait briefly and retry.
500An unexpected server error occurred.
503The system is under scheduled maintenance. Retry after the maintenance window.
504A dependent service did not respond in time. Retry the request.

Headers

HeaderValue
AuthorizationBearer access-token
Content-Typeapplication/json
macnumTop Level Account Number associated with your API credentials.

Path Parameters

ParameterTypeRequiredDescription
accountNumberstringYesThe 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.
iccidstringYesThe 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

ParameterTypeRequiredDescription
datestringYesThe 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.
pageNumbernumberNoAccount-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.
pageSizenumberNoAccount-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.

ParameterTypeDescription
recordsarrayAccount-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.
connectionstringThe 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.
cycleDayintegerThe day number of the requested date within the billing cycle.
dailyUsagenumberDomestic data usage for the requested date, in GB. Returns 0 when no usage was recorded for the connection on that date.
deviceIdstringThe device identifier (IMEI) associated with the connection. An empty string when not known.
usageDatestringThe requested date, echoed back in MM/dd/yyyy format.
pagingInformationobjectAccount-level variant only. Paging details for the result set.
pageNumberintegerThe page returned.
pageSizeintegerThe page size used for the request.
pageCountintegerTotal number of pages available for the given criteria.
recordCountintegerTotal number of connections across all pages.

Failure Responses

Error Message

StatusWhenError message
400date is missing or is a future date.UsageDate: Date is required and cannot be a future date.
400date is not in MM/dd/yyyy format.UsageDate: Date must be in MM/dd/yyyy format.
400accountNumber is not an 8-digit numeric value.Macnum: {accountNumber}: Macnum should be an 8-digit numeric value.
400iccid is not in a valid format (SIM-level), or pageNumber / pageSize is out of range (account-level).A validation message naming the invalid parameter.
401The 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.
403accountNumber does not belong to the hierarchy of the macnum header.Provided macnum: {accountNumber} does not belong to {macnum}.
403The API is not enabled for your organization.Feature SimDataUsageDailyProgressExternalApi is not enabled for {user email}.
404SIM-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

ParameterTypeDescription
resultobjectResult status object.
statusstringResult status: success or failure.
errorsobjectList of errors.
errorCodestringError code.
errorMessagestringError message.

Code Examples

Last updated on