Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.
ReferenceBeta

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

Name
Type
Description

filter

BillingUsageMetricSubmissionFilter

Filtering options for the returned submissions.

first

Int

The first n elements from the paginated list.

after

String

The elements that come after the specified cursor.

last

Int

The last n elements from the paginated list.

before

String

The elements that come before the specified cursor.

orderBy

BillingUsageMetricSubmissionOrder

The ordering options for the returned submissions.

Input types:

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.

Field
Type
Description

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.

Field
Type
Description

field

The field to order by.

direction

The direction to order.

Output types:

BillingUsageMetricSubmissionConnection

A paginated list of BillingUsageMetricSubmission items.

Implements: Connection

Field
Type
Description

edges

A list of edges.

nodes

A list of nodes in the connection (without edge metadata).

pageInfo

Information about the current page.

total

The total count of items matching the filter.


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

Name
Type
Description

filter

BillingInvoiceLineItemSubmissionFilter

Filtering options for the returned submissions.

first

Int

The first n elements from the paginated list.

after

String

The elements that come after the specified cursor.

last

Int

The last n elements from the paginated list.

before

String

The elements that come before the specified cursor.

orderBy

BillingInvoiceLineItemSubmissionOrder

The ordering options for the returned submissions.

Input types:

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.

Field
Type
Description

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.

Field
Type
Description

field

The field to order by.

direction

The direction to order.

Output types:

BillingInvoiceLineItemSubmissionConnection

A paginated list of BillingInvoiceLineItemSubmission items.

Implements: Connection

Field
Type
Description

edges

A list of edges.

nodes

A list of nodes in the connection (without edge metadata).

pageInfo

Information about the current page.

total

The total count of items matching the filter.


Objects

BillingUsageMetricSubmission

Raw usage measurement submitted by a product service. Aggregated later into invoice line items.

Implements: Node

Field
Type
Description

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.

productDomain

The product domain the usage was reported for.

metric

The metric whose value is reported.

externalId

String

External idempotency key (per producer scope).

metricValue

Float!

The metric value reported for the period.

periodStart

Inclusive lower bound of the reporting window.

periodEnd

Exclusive upper bound of the reporting window.

pricingDimensions

Pricing dimension values used for VOLUME pricing tier resolution (key/value JSON).

usageModifiers

Modifier values used for FLAT pricing multipliers (key/value JSON).

extraData

Arbitrary justification metadata; not regulated.

invoiceId

ID

Identifier of the invoice this submission has been claimed by; null while in the unbilled pool.

invoicedAt

When the submission was claimed onto an invoice; null iff invoiceId is null.

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

Field
Type
Description

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.

productDomain

The product domain the line item was reported for.

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.

unitPrice

Unit price for this line.

amount

Optional total amount; if null, the invoicer derives it from quantity * unitPrice.

periodStart

Inclusive lower bound of the reporting window.

periodEnd

Exclusive upper bound of the reporting window.

extraData

Arbitrary justification metadata; not regulated.

invoiceId

ID

Identifier of the invoice this submission has been claimed by; null while in the unbilled pool.

invoicedAt

When the submission was claimed onto an invoice; null iff invoiceId is null.

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.

Field
Type
Description

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.

Field
Type
Description

field

The field to order by.

direction

The direction to order.


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.

Field
Type
Description

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.

Field
Type
Description

field

The field to order by.

direction

The direction to order.


Enums

BillingUsageMetricSubmissionOrderField

Fields available for ordering usage-metric submissions.

Value
Description

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.

Value
Description

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

Field
Type
Description

edges

A list of edges.

nodes

A list of nodes in the connection (without edge metadata).

pageInfo

Information about the current page.

total

The total count of items matching the filter.


BillingUsageMetricSubmissionEdge

An edge in the BillingUsageMetricSubmission connection.

Implements: Edge

Field
Type
Description

cursor

String!

An opaque cursor for this edge.

node

The usage-metric submission at the end of the edge.


BillingInvoiceLineItemSubmissionConnection

A paginated list of BillingInvoiceLineItemSubmission items.

Implements: Connection

Field
Type
Description

edges

A list of edges.

nodes

A list of nodes in the connection (without edge metadata).

pageInfo

Information about the current page.

total

The total count of items matching the filter.


BillingInvoiceLineItemSubmissionEdge

An edge in the BillingInvoiceLineItemSubmission connection.

Implements: Edge

Field
Type
Description

cursor

String!

An opaque cursor for this edge.

node

The invoice-line-item submission at the end of the edge.


See also

Last updated

Was this helpful?