Reading usage submissions
List the usage that Navixy products reported for your workspace, read what each submission says, and narrow the list to one metric or one period.
This guide shows how to read the usage reported for your workspace through the Billing API. You will list your workspace's usage submissions, read what each submission says, and narrow the list to one metric or one period.
Every operation on this page reads the data of the workspace named by your access token. You never pass a workspace ID, so a request can't read the usage of another workspace.
Prerequisites
You need an access token whose workspace_id claim names the workspace. The Billing my* operations, the operations named with the prefix my such as myUsageMetricSubmissions, read that claim. Without it, they refuse the request. See Authentication to learn how the API identifies the workspace.
To check that the token names a workspace and that Billing accepts it, count the workspace's usage submissions with this query:
query UsageCount {
billing {
myUsageMetricSubmissions(first: 1) {
total {
count
}
}
}
}Response for a workspace with 3 reported months:
{
"data": {
"billing": {
"myUsageMetricSubmissions": {
"total": { "count": 6 }
}
}
}
}A count of zero is a valid response: it means that no usage was reported for the workspace. A PERMISSION_DENIED error instead means that the token has no workspace claim. See Error handling.
How usage submissions work
A usage submission is one value of one metric for one period, reported to Billing for your workspace. Navixy products report usage to Billing outside this API, and Billing accepts a submission only for a period that a subscription of the workspace covers. Submissions documents every field.
The Navixy platform reports 2 metrics for every workspace whose subscription covers Business Data Repository, once for each closed calendar month. registered_devices is the number of GPS devices registered in the workspace at the end of the month, and registered_assets is the number of assets. The period of such a submission is the calendar month, cut to the moment the subscription started or was cancelled in its first and last month. Its submittedBy is system, because no person sent it. Until Navixy turns on usage metering for your deployment, the list is empty.
A submission is never changed. A product may report a second submission for the same period, and the platform reports each monthly count once.
Once a day, shortly after midnight UTC, Billing invoices the billing periods that ended. See What an invoice covers to learn which periods an invoice covers. This daily invoicing run puts a submission on an invoice once the submission has arrived and the billing period that contains the submission's end is over. From then on, invoiceId names that invoice, and invoicedAt is when Billing put the submission on it. Until then, both are null. See Reading invoices to learn how the invoice prices the usage.
Example scenario: An operator checks the reported device count
TransLog GmbH runs delivery trucks out of Hamburg. Their workspace has been on the Fleet Pro plan since July 1, 2026, and the plan charges per registered device. On October 6, their administrator checks what the Navixy platform reported for July, August, and September to compare it with the fleet list. To check the reported usage, follow these steps:
List the usage reported for the workspace
myUsageMetricSubmissions lists the workspace's usage submissions, newest first by default. Ask for the metric, the value, the period, and when Billing accepted the submission.
Run this query:
Response:
The workspace has 6 submissions: 2 metrics for each of July, August, and September. October isn't there, because the month isn't over. The platform reported 11 devices at the end of July, 12 at the end of August, and 13 at the end of September. The July submissions start at 08:12:40, the moment the subscription started.
Each month's counts arrived at 00:02 UTC on the first day of the next month. The daily invoicing run at 00:05 the same day put them on that day's invoice, so invoicedAt is a few minutes after submittedAt. The September counts are on INV-2026-000132, issued on October 1. Reading invoices shows that invoice line by line.
Request the next page with after: endCursor while hasNextPage is true. See Pagination for the cursor rules.
Read a submission
These fields describe a submission:
metricnames what was measured. Usecode, such asregistered_devices, to match the submission to your plan: the items of a plan in myAvailablePlans name their metric with the same code. Showtitleandunitto people:titleis the metric's name, such as "Registered devices", andunitis what the value counts, such ascount.metricValueis the reported value, in the metric'sunit. For the 2 platform metrics, it's a count taken at the end of the period.periodStartandperiodEndlimit the period. The start is inclusive and the end is exclusive, so2026-08-01T00:00:00Zto2026-09-01T00:00:00Zis all of August.submittedAtis the time when Billing accepted the submission, from the server clock. For a monthly count, it's shortly after the month is over.submittedByis the actor that sent the submission, orsystemwhen no person did. On the monthly counts of devices and assets, it'ssystem, because the Navixy platform reports them automatically.
invoiceId is the ID of the invoice that charged the submission. Read that invoice with myInvoice. invoicedAt is when Billing put the submission on the invoice. Both are null until an invoice charges the submission.
Show one metric month by month
To follow one metric over time, filter by its ID and order by the period start. metricId is the metric's id. The list in the first step returns it when you ask for metric { id }. Run this query:
Response:
The filter has 9 fields, and they combine with AND: metricId, productDomainId, accounted, submittedAtFrom, submittedAtTo, periodStartFrom, periodStartTo, metricValueMin, and metricValueMax. All the From, To, Min, and Max fields are inclusive, so metricValueMax: 9 keeps the whole counts below 10. A reversed range, such as periodStartFrom after periodStartTo, isn't an error: it matches nothing and returns an empty page. accounted: true keeps the submissions that are on an invoice, and accounted: false keeps the submissions that no invoice charged. See Finding usage that no invoice charged for an example. The list can be sorted by SUBMITTED_AT, PERIOD_START, VALUE, or METRIC.
Finding usage that no invoice charged
accounted: false keeps the submissions that no invoice charged, so their invoiceId is null. Use it to show the usage that Billing charges on a later invoice. Run this query:
Response, on October 6:
The list is empty, because the daily invoicing run put each of TransLog's monthly counts on an invoice a few minutes after the count arrived. A submission stays in this list until the first daily invoicing run after the end of the billing period that contains the submission's end. For example, a product that reports usage for each day has its submissions in this list until the billing period ends.
Invoice line items
Billing also accepts a second kind of submission, the invoice line item. It's a ready-made line with a description, a quantity, and a unit price for a one-off charge such as a service. On an invoice, it's a reported charge line: see What the lines are. myInvoiceLineItemSubmissions lists them for your workspace, with the same paging and the same accounted and submittedAt filters.
Run this query:
The Navixy platform reports no invoice line items, so for a workspace on the standard plans, the response contains an empty list and a count of zero.
Error handling
The Billing operations return errors in the shared format. See Error handling for the response structure and the general codes.
PERMISSION_DENIED
The token has no workspace_id claim, or the claim isn't a workspace ID.
Request a token issued for the workspace.
VALIDATION_ERROR
metricId or productDomainId isn't an ID of that type.
Read field and detail. Take the IDs from the metric and productDomain of a listed submission.
VALIDATION_ERROR
first is above 100.
Send first of 100 or less.
A request without a workspace claim returns the same error as on every Billing field. See How to handle a missing workspace claim in the balance guide.
See also
Submissions: Learn how the 2 submission types, their filters, and the queries work.
Choosing a plan and subscribing: See which metrics a plan prices and what usage it includes.
Reading balance and statement: Read the workspace's prepaid balance and the entries that changed it.
Billing errors: Learn how the Billing operations report a missing entity and which fields their errors have.
Authentication: Learn how the token names the workspace that every operation acts in.
Last updated
Was this helpful?