Skip to Content
Orbyte Labs

Get event

GET
/v1/events/{id}

Returns resolved usage and the original credit debit. All financial fields use integer nano dollars, where one USD is 1000000000 units, and are encoded as integer strings in JSON. Revenue is the sum of each consumed grant's paid amount multiplied by credits used and divided by its original credits. Each grant allocation truncates below one nano dollar. Subscription payments include invoice discounts; manual grants contribute zero revenue. marginUsdInNanos is revenueUsdInNanos minus costUsdInNanos and is omitted if either is unknown. These amounts describe usage allocation, before fees, refunds, or accounting adjustments.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Environment API key or OAuth access token. OAuth requests select context with X-Orbyte-Environment or X-Orbyte-Organization when required by the operation.

Path Parameters

id*string

Header Parameters

X-Orbyte-Environment?string

Required for environment-scoped OAuth operations. API keys remain bound to their own environment.

Length1 <= length

Response Body

Recorded event

application/json
  1. response
value*string
Match^-?(0|[1-9][0-9]*)$
Lengthlength <= 20
costUsdInNanos?string
Match^-?(0|[1-9][0-9]*)$
Lengthlength <= 20
revenueUsdInNanos?string
Match^-?(0|[1-9][0-9]*)$
Lengthlength <= 20
occurredAt*integer
Range0 <= value <= 9007199254740991
id*string
credits*string
Match^-?(0|[1-9][0-9]*)$
Lengthlength <= 20
marginUsdInNanos?string
Match^-?(0|[1-9][0-9]*)$
Lengthlength <= 20
Example Request
curl -X GET 'https://api.orbytelabs.com/v1/events/string'
Example Response
{  "value": "string",  "costUsdInNanos": "string",  "revenueUsdInNanos": "string",  "occurredAt": 0,  "id": "string",  "credits": "string",  "marginUsdInNanos": "string"}