Submissions
Reference for the usage-metric and invoice-line-item submissions of your workspace: the two queries that list them, with filter, order, and pagination types.
The usage-metric and invoice-line-item submissions reported for your workspace, and the queries that list them.
Queries
myUsageMetricSubmissions
The usage-metric submissions reported for the caller's own workspace, newest first by default.
The workspace is not an argument. It is the one the caller's token names; a token carrying no workspace claim is refused.
myUsageMetricSubmissions(
filter: BillingUsageMetricSubmissionFilter
first: Int
after: String
last: Int
before: String
orderBy: BillingUsageMetricSubmissionOrder = { field: SUBMITTED_AT, direction: DESC }
): BillingUsageMetricSubmissionConnection!Arguments
filter
BillingUsageMetricSubmissionFilter
Filtering options for the returned submissions.
orderBy
BillingUsageMetricSubmissionOrder
The ordering options for the returned submissions.
Input types:
Output types:
myInvoiceLineItemSubmissions
The invoice-line-item submissions reported for the caller's own workspace, newest first by default.
The workspace is not an argument. It is the one the caller's token names; a token carrying no workspace claim is refused.
Arguments
filter
BillingInvoiceLineItemSubmissionFilter
Filtering options for the returned submissions.
orderBy
BillingInvoiceLineItemSubmissionOrder
The ordering options for the returned submissions.
Input types:
Output types:
Objects
BillingUsageMetricSubmission
Raw usage measurement submitted by a product service. Aggregated later into invoice line items.
Implements: Node
id
ID!
A globally unique identifier. This ID is opaque and should not be parsed by clients.
workspaceId
ID!
The workspace the usage belongs to.
externalId
String
External idempotency key (per producer scope).
metricValue
Float!
The metric value reported for the period.
pricingDimensions
Pricing dimension values used for VOLUME pricing tier resolution (key/value JSON).
invoiceId
ID
Identifier of the invoice this submission has been claimed by; null while in the unbilled pool.
submittedAt
When billing accepted the submission, from the server clock. A producer cannot supply its own.
submittedBy
String!
The actor that sent the submission, or system when billing could not attribute it. Resolved server-side; a producer cannot supply its own.
BillingInvoiceLineItemSubmission
Pre-built invoice line item submitted externally (no aggregation, one submission = one line).
Implements: Node
id
ID!
A globally unique identifier. This ID is opaque and should not be parsed by clients.
workspaceId
ID!
The workspace the line item belongs to.
externalId
String
External idempotency key (per producer scope).
description
String!
Human-readable line description; the invoice shows it followed by the billing period the line belongs to.
quantity
Float!
Quantity reported for the period.
invoiceId
ID
Identifier of the invoice this submission has been claimed by; null while in the unbilled pool.
submittedAt
When billing accepted the submission, from the server clock. A producer cannot supply its own.
submittedBy
String!
The actor that sent the submission, or system when billing could not attribute it. Resolved server-side; a producer cannot supply its own.
Inputs
BillingUsageMetricSubmissionFilter
Filtering options for the caller's own usage-metric submissions. Fields combine with AND. No workspace field: the workspace is the one the token names.
metricId
ID
Filter by the metric the usage was reported against.
productDomainId
ID
Filter by the product domain the usage belongs to.
accounted
Boolean
Filter by invoicing state: false = unaccounted (not yet rolled into an invoice), true = accounted (already invoiced), omitted = both.
submittedAtFrom
Return submissions whose submittedAt is at or after this timestamp (inclusive).
submittedAtTo
Return submissions whose submittedAt is at or before this timestamp (inclusive).
periodStartFrom
Return submissions whose periodStart is at or after this timestamp (inclusive). A value after periodStartTo matches nothing.
periodStartTo
Return submissions whose periodStart is at or before this timestamp (inclusive).
metricValueMin
Float
Return submissions whose metricValue is at least this value (inclusive). A value above metricValueMax matches nothing.
metricValueMax
Float
Return submissions whose metricValue is at most this value (inclusive). For whole counts, metricValueMax: 9 means fewer than 10.
BillingUsageMetricSubmissionOrder
Ordering options for usage-metric submissions.
BillingInvoiceLineItemSubmissionFilter
Filtering options for the caller's own invoice-line-item submissions. Fields combine with AND. No workspace field: the workspace is the one the token names.
productDomainId
ID
Filter by the product domain the line item belongs to.
accounted
Boolean
Filter by invoicing state: false = unaccounted (not yet rolled into an invoice), true = accounted (already invoiced), omitted = both.
submittedAtFrom
Return submissions whose submittedAt is at or after this timestamp (inclusive).
submittedAtTo
Return submissions whose submittedAt is at or before this timestamp (inclusive).
BillingInvoiceLineItemSubmissionOrder
Ordering options for invoice-line-item submissions.
Enums
BillingUsageMetricSubmissionOrderField
Fields available for ordering usage-metric submissions.
SUBMITTED_AT
Order by when billing recorded the submission.
PERIOD_START
Order by the start of the usage period.
VALUE
Order by the reported metric value.
METRIC
Order by the code of the referenced metric.
BillingInvoiceLineItemSubmissionOrderField
Fields available for ordering invoice-line-item submissions.
SUBMITTED_AT
Order by when billing recorded the submission.
PERIOD_START
Order by the start of the billing period.
Pagination types
BillingUsageMetricSubmissionConnection
A paginated list of BillingUsageMetricSubmission items.
Implements: Connection
BillingUsageMetricSubmissionEdge
An edge in the BillingUsageMetricSubmission connection.
Implements: Edge
cursor
String!
An opaque cursor for this edge.
BillingInvoiceLineItemSubmissionConnection
A paginated list of BillingInvoiceLineItemSubmission items.
Implements: Connection
BillingInvoiceLineItemSubmissionEdge
An edge in the BillingInvoiceLineItemSubmission connection.
Implements: Edge
cursor
String!
An opaque cursor for this edge.
See also
Last updated
Was this helpful?